如下:
1. #!/bin/bash
2.
3. #Whenever you clone a repo, you do not clone all of its branches by default.
4. #If you wish to do so, use the following script:
5.
6. for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do
7. git branch --track ${branch#remotes/origin/} $branch
8. done
发表回复