How to Checkout a Remote Git Branch
You Have One Remote
1
2
$ git fetch
$ git checkout <remote-branch-name>
The above commands will:
- Fetch all remote branches
- Checkout to a branch
You Have More Than One Remote
1
2
$ git fetch <remote-name>
$ git checkout -b <remote-branch-name> <remote-name>/<remote-branch-name>
The above commands will:
- Fetch all remote branches
- Create your own copy of that branch and checkout to the branch