Pull remote branch into local repo with different name?
Solution 1:
git checkout -b myBranchName repo2/master
Solution 2:
The git pull
command is a convenience function that does git fetch
and git merge
. If you only want retrieve branches from a new remote without trying to merge it into any working copy branch you can just use git fetch
. You can then refer to git branch -av
to see all the local and remote branches and operate on either remote as you like.