How to change the remote repository URL
$ git remote set-url origin [new_url]
- Command
- git
- Description
- Change the URL of an existing remote (e.g. origin). Usage: git remote set-url origin [new_url].
- Deep Dive
- Useful when moving a repository to a new host or switching from HTTPS to SSH.
- Related
- How to check remote URLs