1

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?

jub0bs
67.1k27 gold badges198 silver badges200 bronze badges
asked Jun 13, 2015 at 4:02
2

2 Answers 2

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
Sign up to request clarification or add additional context in comments.

Comments

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.

gitup

For more configuration options with git-up, check out this link.

answered Jun 13, 2015 at 5:05

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.