if you wish to revert the changes of a single file use this command (when you file name does not match with any of the branch names):
git checkout filename
if your file name is similar to any of your branch names the use this command:
git checkout -- filename