How to rename git remote


Rename a Git Remote

$ git remote rename <old> <new> 
  • example
$ git remote rename test origin

list remote connection

  • old
$ git remote -v  
...
test	https://github.com/OWNER/REPOSITORY.git (fetch)
test	https://github.com/OWNER/REPOSITORY.git (push)
  • new
$ git remote -v  
...
origin1	https://github.com/OWNER/REPOSITORY.git (fetch)
origin1	https://github.com/OWNER/REPOSITORY.git (push)