git拉取远程所有分支

第一步:

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

第二步:

 git fetch --all

第三步

 git pull --all

注意:

window系统的cmd无法识别第一步中的命令,请使用git bash命令行

原文地址:https://www.cnblogs.com/dobeco/p/11295203.html