git revert uncommitted changes one file code example
Example 1: git reset change in one file
# undo local changes to specific file
git checkout -- file
Example 2: undo unstaged changes git
git checkout -- .
# undo local changes to specific file
git checkout -- file
git checkout -- .