Try this:

# View existing remotes
git remote -v
# origin  https://github.com/user/repo.git (fetch)
# origin  https://github.com/user/repo.git (push)

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

# Verify new remote URL
git remote -v
# origin  https://github.com/user/repo2.git (fetch)
# origin  https://github.com/user/repo2.git (push)
0