Created
June 30, 2009 14:41
-
-
Save ambethia/138187 to your computer and use it in GitHub Desktop.
Replacing forked repo's master branch with my own
This file contains hidden or 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
git clone [email protected]:user_a/repo.git | |
cd repo | |
git branch -m master old-master | |
git symbolic-ref HEAD refs/heads/new-master | |
rm .git/index | |
git clean -fdx | |
# add a remote for user_b's repo, call it, say, user_b | |
git pull user_b master:new-master | |
git branch -m new-master master | |
git push origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment