Git remove origin-How to remove remote origin from Git repo
I just did git init to initialize my folder as git repo 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 to remove git origin?
Instead of removing and adding the URL you can do this.
git remote set-url origin git://new.url.here
This will resolve your query.
Changes URLs for the remote will Set it's first URL for remote that matches regex to . If doesn’t match any URL, an error occurs and nothing is changed.