Aug 102018


How to remove a remote from git

  • 10 August 2018
  • ADM



How to remove a remote from git - images/logos/git.jpg


To remove a remote you can use the command git remote rm in the terminal, from the root folder of your repository.

The git remote rm command has one parameters:

  • the existing remote name;


Will remove the gitlab remote. Note that the command will not delete the repository, just the local reference.

C:\Users\adm\repos\jersey-hello-world>git remote rm gitlab

To check the remote was removed run the following command:

C:\Users\adm\repos\jersey-hello-world>git remote -v
github (fetch)
github (push)


If the remote name doesn't exist the following error will occur:

error: Could not remove config section 'remote.gitlab'