git remote set-url origin https://github.com/user/repo.git

Category: Git - Core

git remote set-url origin https://github.com/user/repo.git

Change the URL of an existing remote

Updates the URL of an existing remote — useful when a repository is moved.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.