git revert onme file code example
Example 1: git revert one file
git checkout HEAD -- /directory/my-file.txt
Example 2: git reset one file
git checkout HEAD -- my-file.txt
git checkout HEAD -- /directory/my-file.txt
git checkout HEAD -- my-file.txt