How to remove a remote origin in Git
In this tutorial, we are going to learn about how to remove a remote origin url from the git repository.
Removing a remote origin
To remove a remote origin in git, we can use the git remote
command followed by the rm origin
.
git remote rm origin
Now, you can add a new origin url by using the following command.
git remote set-url origin https://my-new-url.git
If you want to see your current origin url, run the git remote
command followed by the -v
flag.
git remote -v