1
pythoner 2013-10-08 13:09:37 +08:00
git fetch --all
|
2
jianghu52 2013-10-08 13:36:37 +08:00
我最笨的方式是下载所有包。包括.git包。这样就有所有的版本了。^_^
|
3
Jeremial 2013-10-08 16:04:40 +08:00
据我所知,clone一次就会把整个remote仓库的信息全部download下来,只是默认会切换到master分支.
如果是clone完毕的话,即使在离线的情况下,也可以使用 checkout -t origin/<branch> 来切换到远程分支. |
4
entertainyou 2013-10-08 16:29:40 +08:00
try
git branch -a | grep origin | grep -v HEAD | while read rb;do lb=$(echo ${rb} | cut -d/ -f 3-);git checkout -b $lb $rb;done |
5
tangqiaoboy 2013-10-08 21:50:45 +08:00
1楼正解,get fetch --all
|
6
tangzs OP 用以下脚本解决:
for branch in `git branch -a | sed -n '\=/HEAD$=d; \=/master$=d;s= remotes/==p'`; do git branch --track ${branch##*/} $branch done |
7
tangzs OP |