Skip to content

Instantly share code, notes, and snippets.

@micahblu
Created February 1, 2020 21:27
Show Gist options
  • Save micahblu/08c86f215fc303e9827b0cf5a93bc40b to your computer and use it in GitHub Desktop.
Save micahblu/08c86f215fc303e9827b0cf5a93bc40b to your computer and use it in GitHub Desktop.
bash script to create local git branches from remote branches
for i in `git branch -a | grep remote | grep -v HEAD | grep -v master`; do git branch --track ${i#remotes/origin/} $i; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment