Skip to content

Instantly share code, notes, and snippets.

@craigw
Created August 26, 2009 08:24
Show Gist options
  • Save craigw/175394 to your computer and use it in GitHub Desktop.
Save craigw/175394 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