git clone 所有远程分支到本地

打开git bash

git clone git地址/仓库名/
cd 仓库名/
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
cd ../

posted @ 2021-11-02 18:31  已老  阅读(519)  评论(0编辑  收藏  举报