revert changes in git file as it is code example
Example 1: git reset change in one file
# undo local changes to specific file
git checkout -- file
Example 2: git undo all changes
git reset --hard
# undo local changes to specific file
git checkout -- file
git reset --hard