Skip to content

Instantly share code, notes, and snippets.

@kirang89
Created January 17, 2013 16:32
Show Gist options
  • Save kirang89/4557306 to your computer and use it in GitHub Desktop.
Save kirang89/4557306 to your computer and use it in GitHub Desktop.
Clone a particular branch of a repo
mkdir $BRANCH
cd $BRANCH
git init
git remote add -t $BRANCH -f origin $REMOTE_REPO
git checkout $BRANCH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment