How to clone all remote branches in Git?

后端 未结 30 2097
情话喂你
情话喂你 2020-11-22 01:08

I have a master and a development branch, both pushed to GitHub. I\'ve cloned, pulled, and fetched, but I re

30条回答
  •  你的背包
    2020-11-22 01:41

    When you do "git clone git://location", all branches and tags are fetched.

    In order to work on top of a specific remote branch, assuming it's the origin remote:

    git checkout -b branch origin/branchname
    

提交回复
热议问题