Skip to content

Instantly share code, notes, and snippets.

@DavidHamburg
Created May 20, 2017 23:19
Show Gist options
  • Select an option

  • Save DavidHamburg/7001426efddbb9e821872b9bab47e8ee to your computer and use it in GitHub Desktop.

Select an option

Save DavidHamburg/7001426efddbb9e821872b9bab47e8ee to your computer and use it in GitHub Desktop.
git: checkout all remote branches
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment