DEV Community

Daniel Felix
Daniel Felix

Posted on • Originally published at danielfelix.in

Removing a remote from GIT

Use the git remote rm command to remove a remote URL from your repository.

The git remote rm command takes one argument:

  • A remote name, for example, destination

Example

# view all remotes of a repo
$ git remote -v
> origin    git@github.com:itsdanielfelix/my-awesome-repo.git (fetch)
> origin    git@github.com:itsdanielfelix/my-awesome-repo.git (push)
> gitlab    git@gitlab.com:itsdanielfelix/my-awesome-repo.git (fetch)
> gitlab    git@gitlab.com:itsdanielfelix/my-awesome-repo.git (push)

# Remove a remote
$ git remote rm gitlab

# Verify it
$ git remote -v
> origin    git@github.com:itsdanielfelix/my-awesome-repo.git (fetch)
> origin    git@github.com:itsdanielfelix/my-awesome-repo.git (push)
Enter fullscreen mode Exit fullscreen mode

Top comments (0)