Created
August 27, 2011 14:58
-
-
Save minikermit/1175481 to your computer and use it in GitHub Desktop.
Change a git remote origin
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
The easiest way to tweak this imho is to edit the .git/config file in your repository. Look for the entry you messed up and just tweak the URL. | |
On my machine in a repo I reguarlly use it looks like this: | |
KidA% cat .git/config | |
[core] | |
repositoryformatversion = 0 | |
filemode = true | |
bare = false | |
logallrefupdates = true | |
ignorecase = true | |
autocflg = true | |
[remote "origin"] | |
url = ssh://localhost:8888/opt/local/var/git/project.git | |
#url = ssh://xxx.xxx.xxx.xxx:80/opt/local/var/git/project.git | |
fetch = +refs/heads/*:refs/remotes/origin/* | |
The line you see commented out is an alternative address for the repository that I sometimes switch to simply by changing which line is commented out. | |
This is the file that is getting manipulated under-the-hood when you run something like git remote rm or git remote add but in this case since its only a typo you made it might make sense to correct it this way. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment