how to get rid of all unstaged commits git code example
Example 1: git undo all changes
git reset --hard
Example 2: revert unstaged changes git
git checkout -- path/to/file/to/revert
git reset --hard
git checkout -- path/to/file/to/revert