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?
            Asked
            
        
        
            Active
            
        
            Viewed 267 times
        
    1
            
            
        - 
                    2Does this help? http://stackoverflow.com/questions/4318161/can-git-pull-all-update-all-my-local-branches – jmargolisvt Jun 13 '15 at 04:07
- 
                    Possible duplicate of [Can "git pull --all" update all my local branches?](https://stackoverflow.com/questions/4318161/can-git-pull-all-update-all-my-local-branches) – krlmlr Apr 15 '19 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
 
    
    
        Shreeram K
        
- 1,719
- 13
- 22
1
            
            
        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.

For more configuration options with git-up, check out this link.
 
    
    
        Rahul Gupta
        
- 46,769
- 10
- 112
- 126
 
    