How to quickly undo staged and unstaged changes in git? May 31, 2023 by Tarik git reset HEAD git checkout . git reset HEAD will unstage all changes and git checkout . discards all the changes.