DEV Community

Daniel Felix
Daniel Felix

Posted on • Originally published at


Renaming a remote on GIT

Use the git remote rename command to rename an existing remote.

The git remote rename command takes two arguments:

  • An existing remote name, for example, origin
  • A new name for the remote, for example, destination


# view existing remotes of a repo
$ git remote -v
> origin (fetch)
> origin (push)

# change remote name from 'origin' to 'github'
$ git remote rename origin github

# Verify it
$ git remote -v
> github (fetch)
> github (push)
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

18 Useful Github Repositories Every Developer Should Bookmark

18 Useful GitHub repositories every developer should bookmark: everything from learning resources and roadmaps to best practices, system designs, and tools.