Skip to content

Instantly share code, notes, and snippets.

@duncansmart
Created April 11, 2016 14:09
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 duncansmart/cfbc9984c4da9f17bbca52c341c5c554 to your computer and use it in GitHub Desktop.
Save duncansmart/cfbc9984c4da9f17bbca52c341c5c554 to your computer and use it in GitHub Desktop.
:: tracks all branches for a remote e.g. `git branch --track origin/foo foo`
:: based on info from http://stackoverflow.com/questions/67699/clone-all-remote-branches-with-git
git branch -r | for /f "delims=/ tokens=1,*" %%A IN ('find "origin/"') do (
@git branch --track %%A/%%B %%B
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment