Git reset single file in feature branch to be the same as in master
If you want to revert the file to its state in master
:
git checkout origin/master [filename]
you are almost there; you just need to give the reference to master; since you want to get the file from the master branch:
git checkout master -- filename
Note that the differences will be cached; so if you want to see the differences you obtained; use
git diff --cached