git checkout HEAD -- my-file.txt code example Example: git reset one file git checkout HEAD -- my-file.txt