how to reset staged changes in git code example
Example 1: undo unstaged changes git
git checkout -- .
Example 2: revert unstaged changes git
git checkout -- path/to/file/to/revert
Example 3: git discard staged changes
git reset HEAD
git checkout .