DEV Community

Nagarajan R
Nagarajan R

Posted on

Answer: How to change the URI (URL) for a remote Git repository?

First, view the existing remotes to verify which URL is currently set:

git remote -v

Then, you can set it with:

git remote set-url origin <NEW_GIT_URL_HERE&gt

See git help remote. You also can edit .git/config and change the URLs there.

You're not in any danger of losing history unless…

Top comments (0)