git reset

Enlève des commits ou des changements en réinitialisant la tête Git à l'état spécifié. Si un chemin est passé en paramètre, Git reset fonctionne comme «unstage». Si un hash de commit est passé en paramètre, Git reset annule les commits jusqu'à ce dernier. Plus d'informations : https://git-scm.com/docs/git-reset.

git reset

git reset {{chemin/vers/fichier(s)}}

git reset --patch {{chemin/vers/fichier}}

git reset HEAD~

git reset --soft HEAD~2

git reset --hard

git reset --hard {{commit}}