reset changes in one file git code example
Example 1: git reset change in one file
# undo local changes to specific file
git checkout -- file
Example 2: git reset one file
git checkout HEAD -- my-file.txt
# undo local changes to specific file
git checkout -- file
git checkout HEAD -- my-file.txt