How do I change the URI of a remote in my Git repository?
You can do this using git remote set-url
:
git remote set-url origin https://github.com/username/repositoryname.git
Substitute origin
with the name of your remote, if it differs, and the example URL with the new URL you’d like to set.
You can verify the change by running git remote -v
, which will display the URLs for all remotes.