O comando git remote rm tem um argumento:
- O nome de um remote, como
destination
Exemplo
Estes exemplos assumem que você é está efetuando o clone usando HTTPS, o que é recomendado.
$ git remote -v
# Ver remotes atuais
> origin https://hostname/OWNER/REPOSITORY.git (fetch)
> origin https://hostname/OWNER/REPOSITORY.git (push)
> destination https://hostname/FORKER/REPOSITORY.git (fetch)
> destination https://hostname/FORKER/REPOSITORY.git (push)
$ git remote rm destination
# Remover remote
$ git remote -v
# Confirmar a remoção
> origin https://hostname/OWNER/REPOSITORY.git (fetch)
> origin https://hostname/OWNER/REPOSITORY.git (push)
Observação: o comando git remote rm não exclui o repositório do remote no servidor. Ele simplesmente remove o remote e suas referências do repositório local.
Solução de Problemas
Você pode se deparar com os seguintes erros ao tentar remover um remote.
Could not remove config section 'remote.[name]' (Não foi possível remover a seção de configuração "remote.[name]")
Esse erro informa que o remote que você tentou excluir não existe:
$ git remote rm sofake
> error: Could not remove config section 'remote.sofake'
Verifique se você inseriu corretamente o nome do remote.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
