Introduction
Sometimes you want to undo changes in your project. Git offers two ways: reset and revert. They undo changes differently and affect your project history in unique ways.
When you want to completely remove recent commits from your project history before sharing with others.
When you want to undo a commit but keep the history intact for others to see what happened.
When you accidentally committed something and want to erase it as if it never happened.
When you want to fix a mistake by adding a new commit that cancels out the bad one.
When you want to clean your working directory and staging area to a previous state.