Skip to content

Instantly share code, notes, and snippets.

@jonkaya
Created March 10, 2014 15:30
Show Gist options
  • Save jonkaya/9467180 to your computer and use it in GitHub Desktop.
Save jonkaya/9467180 to your computer and use it in GitHub Desktop.
Git track all remote branches
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