* New Crowdin translations by Github Action * fix frontmatter errors in translation * fix release notes * revert broken translation to main Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
1.7 KiB
1.7 KiB
title, intro, redirect_from, versions
| title | intro | redirect_from | versions | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Agregar un remoto | Para agregar un remoto nuevo, usa el comando `git remote add` en el terminal, dentro del directorio donde está almacenado tu repositorio. |
|
|
El comando git remote add toma dos argumentos:
- Un nombre remoto, por ejemplo,
origin - Una URL remota, por ejemplo,
https://{% data variables.command_line.backticks %}/user/repo.git
Por ejemplo:
$ git remote add origin https://{% data variables.command_line.codeblock %}/<em>user</em>/<em>repo</em>.git
# Set a new remote
$ git remote -v
# Verify new remote
> origin https://{% data variables.command_line.codeblock %}/<em>user</em>/<em>repo</em>.git (fetch)
> origin https://{% data variables.command_line.codeblock %}/<em>user</em>/<em>repo</em>.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://{% data variables.command_line.codeblock %}/octocat/Spoon-Knife.git
> 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