To restore a file to a previous version you can use reset.
git reset <sha1-of-commit> <file-name>
If you have already made local changes to the file (that you do not require!) you can also use the --hard option
Get monthly updates about new articles, cheatsheets, and tricks.