git reset hard one file code example
Example 1: git reset one file
git checkout HEAD -- my-file.txt
Example 2: git reset specific file
git checkout c5f567 -- file1/to/restore file2/to/restore
Example 3: git file reset to head
git checkout HEAD -- my-file.txt