Skip to content

Instantly share code, notes, and snippets.

@jacksonfdam
Created June 12, 2017 15:09
Show Gist options
  • Save jacksonfdam/c15ea308d7aa4b75be0c4658dce6fd59 to your computer and use it in GitHub Desktop.
Save jacksonfdam/c15ea308d7aa4b75be0c4658dce6fd59 to your computer and use it in GitHub Desktop.
Sync all branches from remote.
git branch -r | grep -v '\->' | while read remote; do git checkout ${remote#origin/}; git fetch origin ${remote#origin/}; git pull origin ${remote#origin/};done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment