大家好,
假设我的[code]git branch -a[/code]的输出如下:
[code]*dev
gcb
gps
master
remotes/gh/dev
remotes/gh/gcb
remotes/gh/gps
remotes/gh/master
remotes/origin/dev
remotes/origin/gcb
remotes/origin/gps
remotes/origin/master
[/code]
我想递归地把所有的DEV都PULL在一起,所有的GPS都PULL在一起,比方说:git pull gh/dev into local dev, git pull origin/dev into local dev。等等。
怎么实现呢?
或者,GIT里面有没有什么现成的简单的解决方法?
怎样git pull 所有的branches?
-
- 帖子: 53
- 注册时间: 2008-03-05 21:42
-
- 帖子: 2
- 注册时间: 2010-09-18 0:58
Re: 怎样git pull 所有的branches?
git fetch origin
git pull is actually a git fetch followed by a git merge.
i guess what you want is a :
git fetch origin
git fetch gh
git merge origin/dev gh/dev
you could write a simple shell script to do that.
git pull is actually a git fetch followed by a git merge.
i guess what you want is a :
git fetch origin
git fetch gh
git merge origin/dev gh/dev
you could write a simple shell script to do that.