Pull remote branch into local repo with different name?

后端 未结 2 676
醉话见心
醉话见心 2020-12-12 17:43

Alright I did a little bit of research on this but I couldn\'t find an exact answer, so I have to ask.

I have 2 remotes: origin and repo2.

I\'d like to do so

相关标签:
2条回答
  • 2020-12-12 18:20

    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.

    0 讨论(0)
  • 2020-12-12 18:26
    git checkout -b myBranchName repo2/master
    
    0 讨论(0)
提交回复
热议问题