WeCodeAcademy
❮ git resetgit stash ❯

git reset --hard

Undoes commits and discards changes.

Group: Undo

Syntax

git reset --hard HEAD~1

Example

Examplebash
Open in editor »
/ $

← All of Git Command Reference