Created
March 10, 2014 15:30
-
-
Save jonkaya/9467180 to your computer and use it in GitHub Desktop.
Git track all remote branches
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using bash: | |
for remote in `git branch -r `; do git branch --track $remote; done | |
Update the branches, assuming there are no changes on your local tracking branches: | |
for remote in `git branch -r `; do git checkout $remote ; git pull; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment