准备:
- 手动将所有分支签出到本地存储库(签出所有分支的脚本如下所示),
git push origin '*:*'
用于将所有分支检出到本地存储库的 .sh 脚本:
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do
git branch --track ${branch#remotes/origin/} $branch
done
标签:git,grep,branch,所有,本地,推送,远程,分支
From: https://www.cnblogs.com/DawaTech/p/16855055.html