1
0
mirror of https://github.com/k88hudson/git-flight-rules.git synced 2025-06-16 21:01:45 -03:00

Update reflog shortname with an ancestry reference (#345)

This commit is contained in:
apastan
2023-02-01 05:17:10 +03:00
committed by GitHub
parent 18c656604b
commit 3ff35c8642
9 changed files with 9 additions and 15 deletions

View File

@ -201,8 +201,7 @@ $ git push --force-with-lease [remote] [branch]
Si no has subido tus cambios, para resetear Git al estado en el que estaba antes de realizar tu último commit (mientras mantengas tus cambios en staging):
```
(my-branch*)$ git reset --soft HEAD@{1}
(my-branch)$ git reset --soft HEAD^
```
Esto solo funciona si no subiste tu commit. Si lo hiciste, la única cosa segura por hacer es `git revert SHAofBadCommit`. Eso creará un nuevo commit que deshace todos los cambios del anterior commit. O, si la rama que subiste es segura ante reorganizaciones (ej. otros desarrolladores no esperan recibir cambios desde ahí), puedes usar `git push --force-with-lease`. Para más, mira [la sección de arriba](#quiero-borrar-o-remover-mi-ultimo-commit).