Created
December 11, 2012 19:39
-
-
Save benbalter/4261396 to your computer and use it in GitHub Desktop.
How to fork a single branch of a repo, preserving commit log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir target-repo | |
cd target-repo | |
git init | |
git remote add origin [email protected]... | |
git remote add upstream [email protected].... | |
git fetch upstream | |
git pull upstream master | |
git push origin master | |
Alternative: | |
git clone [email protected]... | |
cd target-repo | |
git remote add upstream [email protected].... | |
git fetch upstream | |
git pull upstream master | |
git push origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Where is the reference to any branch? I can only see references here to 'master'.