Hard Reset Single File If you want to hard reset a single file in a Git repository use: git checkout HEAD -- path/to/the/file.txt