How to undo (almost) anything with Git
https://github.blog/2015-06-08-how-to-undo-almost-anything-with-git/
https://github.blog/2015-06-08-how-to-undo-almost-anything-with-git/
How to undo and redo in git?
For both undo and redo, use git reflog and git reset --hard head@{n}
You will find n in the result of git reflog.