Git - Change remote URL

How to change the remote URL with one line of code?

Published 2021-07-16

Check the origin of the git

git remote -v

Change your remote's URL from SSH to HTTPS with the git remote set-url command.

$ git remote set-url origin https://github.com/USERNAME/REPOSITORY.git

Verify that the remote URL has changed.

$ git remote -v

Related Tutorials :