Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove remote origin from a Git repository

Tags:

git

git-remote

I just did git init to initialize my folder as Git repository and then added a remote repository using git remote add origin URL. Now I want to remove this git remote add origin and add a new repository git remote add origin new-URL. How can I do it?

like image 952
Om3ga Avatar asked May 02 '13 04:05

Om3ga


1 Answers

Instead of removing and re-adding, you can do this:

git remote set-url origin git://new.url.here 

See this question: How to change the URI (URL) for a remote Git repository?

To remove remote use this:

git remote remove origin 
like image 152
kahowell Avatar answered Oct 26 '22 04:10

kahowell