how to reset hard one file code example Example: hard reset single file git checkout HEAD -- my-file.txt