I thought
git pull --all
# 或
git fetch --all
Just update all branches. I just read the manual and it turns out that this --all
updates this branch from all remote repositories.
I have develop
, master
, feature-xxx
locally and these branches are all associated with the remote warehouse.
What should I do if I want to fetch
or pull
download all branches from the server at once?
阿神2017-05-02 09:38:43
I wrote a script myself. Contribute.
git branch | awk 'BEGIN{print "echo ****Update all local branch...@daimon***"}{if(=="*"){current=substr(rrreee,3)};print a"git checkout "substr(rrreee,3);print "git pull --all";}END{print "git checkout " current}' |sh
我想大声告诉你2017-05-02 09:38:43
For details, please see:
Can “git pull --all” update all my local branches?
There should be no native solution, or Git itself does not have such a function?