Skip to content

Instantly share code, notes, and snippets.

@c17r
Created February 6, 2014 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save c17r/8846197 to your computer and use it in GitHub Desktop.
Save c17r/8846197 to your computer and use it in GitHub Desktop.
Git: clone a branch without fetching other branches
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