Skip to content

Instantly share code, notes, and snippets.

@htuscher
Created July 24, 2013 08:14
Show Gist options
  • Save htuscher/6068832 to your computer and use it in GitHub Desktop.
Save htuscher/6068832 to your computer and use it in GitHub Desktop.
Clone all remote branches and track
#!/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