You have made changes to a file that you realize was wrong (eg. overrige a file’s content) and you want to revert it to the latest comitted version:
git checkout <filename>
If you have a branch with the same name you need to do:
git checkout — <filename>
source: http://norbauer.com/notebooks/code/notes/git-revert-reset-a-single-file