In this chapter, we will cover the following recipes:
- Undo – Remove a commit completely
- Undo – Remove a commit and retain changes to files
- Undo – Remove a commit and retain 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