How you can change the server URL for GIT repository

Assume that your remote origin (repository server URL) is: git@repositoryserver.com/repository-name.git  and you want to replace it with git@newrepositoryserver.com/repository-name.git .

Command to check your current origins:

You will be able to see the origins for both fetch and push operations:

Command to change the GIT repository origin:

That’s it. You now successfully relocated your repository pointing to the new server.