How to fetch all Git branches

后端 未结 30 1609
情书的邮戳
情书的邮戳 2020-11-22 09:38

I cloned a Git repository, which contains about five branches. However, when I do git branch I only see one of them:

$ git branch
* master
         


        
30条回答
  •  忘掉有多难
    2020-11-22 09:59

    To list remote branches:
    git branch -r

    You can check them out as local branches with:
    git checkout -b LocalName origin/remotebranchname

提交回复
热议问题