1
0
mirror of synced 2026-01-11 12:01:47 -05:00
Files
docs/translations/es-ES/content/github/using-git/adding-a-remote.md
Vanessa Yuen 5336b9a35c translations batch (#17637)
* 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>
2021-02-02 19:56:26 +00:00

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.
/articles/adding-a-remote
free-pro-team enterprise-server github-ae
* * *

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

Leer más