I currently have three modified files in my working directory. However I want one of them to be reset to the HEAD status.
In SVN I'd use svn revert <filename> (followed by svn update <filename> if needed) but in git I should use git reset --hard. However this command cannot operate on a single file.
Is there any way in git to discard a single file changes and overwrite it with a fresh HEAD copy?
git checkoutbelow is the answer. In git, "revert" is something you do to a commit. "Revert" replays the inverse of a historical commit into your working directory, so you can make a new commit that "undoes" the reverted commit. I find this is a frequent point of confusion for people coming to git from svn. – Dan Ray Aug 22 '11 at 12:34