Created
July 6, 2011 02:10
-
-
Save douglas/1066385 to your computer and use it in GitHub Desktop.
Changing git repository without needing to delete and clone the repository
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
# first see the current origin | |
git remote -v | |
# now we delete the origin | |
git remote rm origin | |
# now we set the new origin | |
git remote add origin [email protected]:user/reponame.git | |
# optional: make git pull and push from someremote (on our case, origin) | |
git config branch.master.remote someremote | |
git config branch.master.merge refs/heads/master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment