How to rename an existing git remote ?
To list down your remote repository handles that is currently being used in local repository, we use git remote -v command.
Advertisements
> git remote -v origin https://achandran@bitbucket.org/poopcoders/ppcode-batch.git (fetch) origin https://achandran@bitbucket.org/poopcoders/ppcode-batch.git (push)
To rename a remote, you can use the following command.
git remote rename <current-remote-name> <new-name>
git remote rename origin ppbatch
or..
> git remote -v ppbatch https://achandran@bitbucket.org/poopcoders/ppcode-batch.git (fetch) ppbatch https://achandran@bitbucket.org/poopcoders/ppcode-batch.git (push)
You can remove a git remote if you do not want it.