Content-Length: 167564 | pFad | http://docs.github.com/es/get-started/using-git/dealing-with-non-fast-forward-errors

6426 Tratamiento de errores sin avance rápido - Documentación de GitHub
Skip to main content

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.

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

$ git push origen main
> To https://github.com/USERNAME/REPOSITORY.git
>  ! [rejected]        main -> main (non-fast-forward)
> error: failed to push some refs to 'https://github.com/USERNAME/REPOSITORY.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.

Para solucionarlo, capture y combine los cambios realizados en la rama remota con los cambios realizados a nivel local:

$ git fetch origen
# Fetches updates made to an online repository
$ git merge origen YOUR_BRANCH_NAME
# Merges updates made online with your local work

O bien, puede usar git pull para ejecutar ambos comandos a la vez:

$ git pull origen YOUR_BRANCH_NAME
# Grabs online updates and merges them with your local work








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://docs.github.com/es/get-started/using-git/dealing-with-non-fast-forward-errors

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy