1
0
mirror of synced 2026-01-14 21:01:32 -05:00
Files
docs/translations/es-ES/content/github/using-git/dealing-with-non-fast-forward-errors.md
Vanessa Yuen 01b5d89239 Crowdin translations (translation-batch-1610993249) (#17348)
* New Crowdin translations by Github Action

* Revert broken translated files to English

* fix mistranslated type

* fix mistranslated dates

* fix liquid operator

* revert broken to english

* revert broken translations to english

* revert broken translations to english

* fix broken liquid tag 😭

* fix tags

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2021-01-19 20:12:46 +01:00

1.5 KiB

title, intro, redirect_from, versions
title intro redirect_from versions
Tratamiento de errores sin avance rápido En ocasiones, Git no puede efectuar tu cambio en un repositorio remoto sin perder confirmaciones. Cuando esto sucede, los cambios que deseas subir se rechazan.
/articles/dealing-with-non-fast-forward-errors
free-pro-team enterprise-server github-ae
* * *

Si otra persona ha subido cambios en la misma rama que tú, Git no podrá subir tus cambios:

$ git push origin main
> To https://{% data variables.command_line.codeblock %}/<em>USERNAME</em>/<em>REPOSITORY</em>.git
>  ! [rejected]        main -> main (non-fast-forward)
> error: failed to push some refs to 'https://{% data variables.command_line.codeblock %}/<em>USERNAME</em>/<em>REPOSITORY</em>.git'
> To prevent you from losing history, non-fast-forward updates were rejected
> Merge the remote changes (e.g. 'git pull') before pushing again.  See the
> 'Note about fast-forwards' section of 'git push --help' for details.

Puedes resolver este problema extrayendo y fusionando los cambios realizados en la rama remota con los cambios que has hecho localmente:

$ git fetch origin
# Fetches updates made to an online repository
$ git merge origin <em>YOUR_BRANCH_NAME</em>
# Merges updates made online with your local work

O bien, puedes simplemente usar git pull para ejecutar al mismo tiempo ambos comandos:

$ git pull origin <em>YOUR_BRANCH_NAME</em>
# Grabs online updates and merges them with your local work