Git reset is a powerful command for undoing local changes to the state of a Git repo. This command resets the current HEAD to the specified stage.
It resets both the index and the working directory to the state of your last commit. Git reset has three modes i.e. soft, hard and mixed. The default mode of operation is mixed.