1.How to use git to checkout remote branch?
First you need to fetch those new remote branches by using:
1 | git fetch origin |
1 | show and see all the branches: |
1 | git branch -v -a |
Then checkout the branch you are interested in:
for example: a remote branch named test and you want to checkout this branch by using the name mybranch
1 | git checkout -b mybranch origin/test |
If your Git version >= 1.6.6 you can simply by running:
1 | git checkout test |