Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GIT Xcode - change origin

Tags:

git

xcode

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

like image 430
Moni Viki Avatar asked May 10 '11 15:05

Moni Viki


2 Answers

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.

like image 53
manojlds Avatar answered Oct 18 '22 14:10

manojlds


# 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.

like image 29
Dan Ray Avatar answered Oct 18 '22 15:10

Dan Ray