Command
Explanation
git reset is used to reset the current HEAD to the specified state. It resets the current HEAD to the specified state.
Examples
Undo last commit, keep changes
Undo last commit and discard changes
Unstage file
git reset is used to reset the current HEAD to the specified state. It resets the current HEAD to the specified state.
Undo last commit, keep changes
Undo last commit and discard changes
Unstage file