Git: How to remove remote origin from Git repo
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
If you insist on deleting it:
git remote remove origin
Or if you have Git version 1.7.10 or older
git remote rm origin
But kahowell's answer is better.
To remove a remote:
git remote remove origin
To add a remote:
git remote add origin yourRemoteUrl
and finally
git push -u origin master