mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 17:22:10 +02:00

* git-prune: add it translation * git-reflog: add it translation * git-remote: add it translation * git-repack: add it translation * git-restore: add it translation * git-rev-parse: add it translation * git-rev-list: add it translation * git-rm: add it translation * git-rebase: add it translation * git-revert: add it translation * git-reset: add it translation * git-replace: add it translation * git-reset: separate file tokens * Use correct suffix for multiple tokens Co-authored-by: Axel Navarro <navarroaxel@gmail.com> * Integrate updates in #4533 Co-authored-by: Axel Navarro <navarroaxel@gmail.com>
1.1 KiB
1.1 KiB
git reset
Annulla commit o rimuovi modifiche dall'area di stage, reimpostando l'HEAD corrente su uno specifico stato. Se viene fornito un percorso, il comando reset si interpreta come "rimuovi dall'area di stage"; se viene fornito l'hash di un commit o un ramo, si interpreta come "annulla commit". Maggiori informazioni: https://git-scm.com/docs/git-reset.
- Rimuovi tutto dall'area di stage:
git reset
- Rimuovi dall'area di stage uno o più file:
git reset {{percorso/al/file1}} {{percorso/al/file2}}
- Rimuovi dall'area di stage solo alcune porzioni di un file:
git reset -p {{percorso/al/file}}
- Annulla l'ultimo commit, preservando tutte le modifiche nel filesystem:
git reset HEAD~
- Annulla gli ultimi due commit, aggiungendo all'area di stage le modifiche relative:
git reset --soft HEAD~2
- Annulla le modifiche non committate, indipendentemente se siano presenti nell'area di stage o meno (usa
git checkout
per queste ultime):
git reset --hard
- Reimposta il repository su un dato commit, annullando qualsiasi tipo di modifica precedente:
git reset --hard {{commit}}