Change remote origin in git repo

Sometimes you need to change the remote origin in a git repo, if the server moves or if you just get better at NGINX and change the URL to something cleaner. Here are the simple steps on how to update your remote origin.

List remote origins

git remote -v

Add new remote origin

git remote set-url add origin https://sweetNewDomain/git/user/RepoName

Remove old origin

git remote set-url delete origin 192.168.1.33:3030/git/user/RepoName

List remote origins again

git remote -v

Verify that your URLs are correct and do a git fetch make sure everything is working. On your next push, you will need to re-enter your username and password.
Nice work!