Change a git remote's URL
Point an existing remote at a new URL without removing and re-adding it.
When a repo moves hosts (or you switch between SSH and HTTPS), update the existing remote in place instead of deleting it and adding it back.
git remote set-url origin new.git.url/hereRun git remote -v afterwards to confirm both fetch and push URLs point where you expect.
Liked this? Get the next one in your inbox.
One email every other Tuesday. Engineering, product, and what I'm shipping. Unsubscribe anytime.