Skip to content

Instantly share code, notes, and snippets.

@mattyoho
Forked from craigw/gist:175394
Created August 30, 2009 23:58
Show Gist options
  • Save mattyoho/178218 to your computer and use it in GitHub Desktop.
Save mattyoho/178218 to your computer and use it in GitHub Desktop.
#!/bin/sh
REPO=$1
git clone $REPO
cd `basename $REPO .git`
for BRANCH in `git branch -r`; do
git co --track \
-b remote/$BRANCH \
$BRANCH
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment