Skip to content

Instantly share code, notes, and snippets.

@mattbontrager
Created October 21, 2016 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattbontrager/41f5e40471285df202ab3fbc9a4e63b5 to your computer and use it in GitHub Desktop.
Save mattbontrager/41f5e40471285df202ab3fbc9a4e63b5 to your computer and use it in GitHub Desktop.
Fetch and track all git branches
for remote in `git branch -r`; do git branch --track ${remote#origin/} $remote; done
git fetch --all
git pull --all
# credit to Wookie88 and Shadowfax @ http://stackoverflow.com/questions/10312521/how-to-fetch-all-git-branches
# saving this for quick reference and easy insertion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment