Skip to content

Instantly share code, notes, and snippets.

@alexanderscott
Created September 7, 2014 03:52
Show Gist options
  • Save alexanderscott/284908b628ca61b245e5 to your computer and use it in GitHub Desktop.
Save alexanderscott/284908b628ca61b245e5 to your computer and use it in GitHub Desktop.
locally track all git remote branches
#!/bin/bash
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do
git branch --track ${branch##*/} $branch
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment