git branch -r | grep -v ‘\->‘ | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
首先同步所有远程分支,如上:
将本地所有分支与远程保持同步 git fetch --all
git fetch --all
最后拉取所有分支代码 git pull --all
git pull --all
Git拉取远程所有分支
原文:https://www.cnblogs.com/chenliuxiao/p/14303391.html