Skip to content

Instantly share code, notes, and snippets.

@jamesmehorter
Created October 23, 2014 17:11
Show Gist options
  • Save jamesmehorter/d20b6623e6961b45be26 to your computer and use it in GitHub Desktop.
Save jamesmehorter/d20b6623e6961b45be26 to your computer and use it in GitHub Desktop.
Git clone all branches
#!/bin/bash
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do
git branch --track ${branch#remotes/origin/} $branch
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment