Skip to content

Instantly share code, notes, and snippets.

@kreamweb
Created March 15, 2011 09:26
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 kreamweb/870494 to your computer and use it in GitHub Desktop.
Save kreamweb/870494 to your computer and use it in GitHub Desktop.
clonare un branch
mkdir $BRANCH
cd $BRANCH
git init
git remote add -t $BRANCH -f origin $REMOTE_REPO
git checkout $BRANCH
oppure
mkdir newrepo.git
cd newrepo.git
git init
git remote add origin file:///path/to/original
git fetch origin branchiwant:refs/remotes/branchiwant
git checkout -b branchiwant --track origin/branchiwant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment