In this chapter, we will cover the following topics:
Undo – remove a commit completely
Undo – remove a commit and retain the changes to files
Undo – remove a commit and retain the changes in the staging area
Undo – working with a dirty area
Redo – recreate the latest commit with new changes
Revert – undo the changes introduced by a commit
Reverting a merge
Viewing past Git actions with git reflog
Finding lost changes with git fsck