El comando git remote add toma dos argumentos:
- Un nombre remoto, por ejemplo,
origin - Una URL remota, por ejemplo,
https://[hostname]/user/repo.git
Por ejemplo:
$ git remote add origin https://nombre de host/user/repo.git
# Set a new remote
$ git remote -v
# Verify new remote
> origin https://nombre de host/user/repo.git (fetch)
> origin https://nombre de host/user/repo.git (push)
¿No estás seguro de que URL usar? Examina "¿Qué URL remota debería usar?"
Solución de problemas
Puedes encontrar estos errores al tratar de agregar un remoto.
El nombre remoto ya existe
Este error significa que trataste de agregar un remoto con un nombre que ya existe en tu repositorio local:
$ git remote add origin https://nombre de host/octocat/Spoon-Knife
> fatal: remote origin already exists.
Para arreglar esto, puedes
- Usar un nombre diferente para el nuevo remoto
- Renombrar el remoto existente
- Eliminar el remoto existente

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.
