git reset file in working directory code example Example: git file reset to head git checkout HEAD -- my-file.txt