From: Peter Baumann Date: Wed, 13 Dec 2006 23:32:40 GMT Subject: Re: svn versus git Message-ID: In-Reply-To: [...] >> svn revert:: >> Restore pristine working copy file (undo most local edits). >> git reset --hard:: >> Reset the repository to an arbitrary point in the past, updating the >> working copy as well. >> git checkout -f HEAD :: >> Checks out from HEAD, forcing an overwrite of any working >> directory changes to that file. >> >> Draw. There is no easy way to undo changes that have already been >> committed to a subversion repository, so git would win. However, it's >> uncomfortable to revert a single file using checkout. > > There was talk about adding "git reset [] -- ". > I would appreciate this. The first thing which comes to my mind if I have to actualy revert a change I made was git reset file After that didn't work I figured out I have to use the seperating -- and typed git reset -- file and that didn't work, too. After several hours (ok, I'am just exaggerating, it took me only about 15 minutes) reading manpages I figured out that I have to use git checkout [] -- file After putting some thought into the mental model behind git checkout -- file this command it looks obvious and understantable, but in _my_ mental modell git reset [