reset a file to current commit code example
Example 1: How can I reset or revert a file to a specific revision?
git reset <commit hash> <filename>
Example 2: git revert commit for single file
git checkout <commit_hash> path/to/file
git reset <commit hash> <filename>
git checkout <commit_hash> path/to/file