List your existing remotes in order to get the name of the remote you want to change (notice we forgot to include .git on the end of the repository directory)
cd project git remote -v origin ssh://USERNAME@SERVER/HOME/USERNAME/REPOSITORY (fetch) origin ssh://USERNAME@SERVER/HOME/USERNAME/REPOSITORY (push)
Change your remote’s URL with the git remote set-url
command.
git remote set-url origin ssh://USERNAME@SERVER/HOME/USERNAME/REPOSITORY.git
Verify that the remote URL has changed.
git remote -v # Verify new remote URL origin ssh://USERNAME@SERVER/HOME/USERNAME/REPOSITORY.git (fetch) origin ssh://USERNAME@SERVER/HOME/USERNAME/REPOSITORY.git (push)
Advertisements