Git Working with Remotes Changing Git Remote URL


Example

Check existing remote

git remote -v 
# origin https://github.com/username/repo.git (fetch)
# origin https://github.com/usernam/repo.git (push)

Changing repository URL

git remote set-url origin https://github.com/username/repo2.git
# Change the 'origin' remote's URL

Verify new remote URL

git remote -v
# origin  https://github.com/username/repo2.git (fetch)
# origin  https://github.com/username/repo2.git (push)