git拉去远程所有分支内容

远程项目分支过多,本地使用git branch只展示master

1、git clone xx

        使用git branch只能看到拉去的master分支

        使用 git branch -a 可查看所有

2、

git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done

git fetch --all

git pull --all

3、此时本地使用git branch即可查看所有远程端分支


版权声明:本文为H_Elie原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。