git how to check out a file from an earlier commit code example Example: How can I reset or revert a file to a specific revision? git reset <commit hash> <filename>