1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 22:22:09 +02:00
tldr/pages.es/common/git-restore.md
Ignacio Mattos 8939f2e0eb
git-*: sync Spanish translation (#5893)
* git-config: sync Spanish translation

* git-lfs: sync Spanish translation

* git-log: sync Spanish translation

* git-remote: sync Spanish translation

* git-restore: sync Spanish translation

* git-show: sync Spanish translation

* git-status: sync Spanish translation

* git-switch: sync Spanish translation
2021-05-04 13:18:41 -04:00

845 B

git restore

Restaura los archivos del árbol de trabajo. Requiere la version 2.23+ de Git. Véase también git checkout y git reset. Más información: https://git-scm.com/docs/git-restore.

  • Restaura un archivo sin marcar a la versión del commit actual (HEAD):

git restore {{ruta/al/archivo}}

  • Restaura un archivo sin marcar a la versión de un commit específico:

git restore --source {{commit}} {{ruta/al/archivo}}

  • Descarta los cambios sin commit para los archivos rastreados:

git restore :/

  • Desmarca un archivo:

git restore --staged {{ruta/al/archivo}}

  • Desmarca todos los archivos:

git restore --staged :/

  • Descarta todos los cambios de los archivos, marcados o no:

git restore --worktree --staged :/

  • Selecciona interactivamente secciones de archivos para restaurar:

git restore --patch