cancel unstaged changes git code example
Example 1: revert unstaged changes git
git checkout -- path/to/file/to/revert
Example 2: what to do with unstaged changes after reset
git rm --cached -r .
git checkout -- path/to/file/to/revert
git rm --cached -r .