Skip to content

Instantly share code, notes, and snippets.

@bora89
Last active October 27, 2016 09:16
Show Gist options
  • Save bora89/470ce4f4a7d87255a0d812fa54818e59 to your computer and use it in GitHub Desktop.
Save bora89/470ce4f4a7d87255a0d812fa54818e59 to your computer and use it in GitHub Desktop.
Track all remote branches then fetch and pull them all. http://stackoverflow.com/questions/10312521/how-to-fetch-all-git-branches
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
git branch --track style origin/style
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment