Seemingly git pull does fetch and merge only for the current branch, is there an easy way to pull for all branches in local repo?
- 
 2Does this help? stackoverflow.com/questions/4318161/…jmargolisvt– jmargolisvt2015年06月13日 04:07:18 +00:00Commented Jun 13, 2015 at 4:07
 - 
 Possible duplicate of Can "git pull --all" update all my local branches?krlmlr– krlmlr2019年04月15日 19:38:27 +00:00Commented Apr 15, 2019 at 19:38
 
2 Answers 2
Try this
for remote in `git branch -r`; do git branch --track $remote; done
git fetch --all
git pull --all
 
 answered Jun 13, 2015 at 4:49
 
 
 
 Shreeram K 
 
 1,74713 silver badges22 bronze badges
 
 
 Sign up to request clarification or add additional context in comments.
 
 
 
 Comments
You can use git-up for this. It will automate the process of fetching and rebasing all locally-tracked remote branches. You don't have to type multiple commands again and again. You can achieve this in a single command. 
Installation:
gem install git-up
Usage:
git up
This command will then fetch and rebase all the locally-tracked remote branches automatically.
gitup
For more configuration options with git-up, check out this link.
 answered Jun 13, 2015 at 5:05
 
 
 
 Rahul Gupta 
 
 48k12 gold badges120 silver badges131 bronze badges