Skip to content

Instantly share code, notes, and snippets.

@mrroot5
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrroot5/a97d0499c5a49a0c4de0 to your computer and use it in GitHub Desktop.
Save mrroot5/a97d0499c5a49a0c4de0 to your computer and use it in GitHub Desktop.
Cambios en archivos
# BORRAR ARCHIVOS
# Elimina un fichero en el directorio de trabajo y en el Index
git rm file_name
# Elimina un fichero solamente en el Index
git rm --cached file_name
# Mismo caso que el anterior
git reset HEAD file_name
git checkout file_name
# AGREGAR ARCHIVOS DESPUES DE HACER COMMIT
# Tambien permite reescribir el comentario
git commit --amend
# RESTAURAR ARCHIVOS
# Toma el de la version del HEAD, osea, del ultimo commit
git checkout -- file_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment