git checkout file for commit code example Example: How can I reset or revert a file to a specific revision? git reset <commit hash> <filename>