I have a commit that involves changes to several files. Now I want to remove the changes that I did to one of the files. More precisely, I want this file to be identical to its current version on the remote master. How can I achieve this?
I guess that
git checkout -- <filename>
might do what I need but I am not sure.
I have also seen this syntax:
git checkout <commit> <filename>
I guess that the last command removes the changes of the file introduce by a particular commit but what then the first command does? Does it remove the changes introduced by all commits performed after git pull?