git discard changes on one file code example
Example 1: git reset change in one file
# undo local changes to specific file
git checkout -- file
Example 2: discard unstaged changes git
#For all unstaged files in current working directory use:
git checkout -- .
#For a specific file use:
git checkout -- path/to/file/to/revert