10

How can i change the origin url in the GIT Repository. I dont want to add a new repo. I want to change the old one.Please help me. I find option to add new one but not change the existing one.

Thanks

Simon
  • 31,675
  • 9
  • 80
  • 92
Moni Viki
  • 949
  • 1
  • 14
  • 20

2 Answers2

14

I don't think you can do that from XCode4, much like many other things.

Do git remote set-url origin <newurl> like @Dan Ray suggests, or go to .git/config and edit the url to the new one.

And one piece of advice, Git is enjoyed through the command line, so where the IDE/ GUI doesn't work, be happy to work from the command line.

manojlds
  • 290,304
  • 63
  • 469
  • 417
  • I am getting authentication error, while using GIT with XCODE. THe Username and Password is correct. Still it gives me errors. – Moni Viki May 10 '11 at 19:36
5
# git remote set-url origin <newurl>

If your question is how to do this from within Xcode, then I don't know. This is how you do it in git. Whatever Xcode would do would really be doing this.

Dan Ray
  • 21,623
  • 6
  • 63
  • 87