Skip to content

Instantly share code, notes, and snippets.

@ncornette
Created February 19, 2015 09:37
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 ncornette/77fdf6ee4777965813d4 to your computer and use it in GitHub Desktop.
Save ncornette/77fdf6ee4777965813d4 to your computer and use it in GitHub Desktop.
Git track all remote branches
#1 create fresh git clone
#2 track all remote branches
for b in `git branch -r | sed "s/ origin\///g"`; do git branch $b -t origin/$b; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment