From: Sam Vilain Date: Thu, 30 Oct 2008 17:51:08 GMT Subject: Re: [PATCH] Documentation: add a planning document for the next CLI revamp Message-ID: <1225389068.19891.28.camel@maia.lan> In-Reply-To: <20081030143918.GB14744@mit.edu> On Thu, 2008-10-30 at 10:39 -0400, Theodore Tso wrote: > * Add the command "git revert-file " which is syntactic sugar for: > > git checkout HEAD -- > > Rationale: Many other SCM's have a way of undoing local edits to a > file very simply, i.e."hg revert " or "svn revert ", and > for many developers's workflow, it's useful to be able to undo local > edits to a single file, but not to everything else in the working > directory. And "git checkout HEAD -- " is rather cumbersome > to type, and many beginning users don't find it intuitive to look in > the "git-checkout" man page for instructions on how to revert a > local file. Well, I don't have strong feelings on the exact command name used; I suggested "undo", probably also ambiguous. But still, a significant number of users are surprised when they type 'git revert' and they get a backed out patch. It's such an uncommon operation, it doesn't deserve to be triggered so easily. And reverting files to the state in the index and/or HEAD is a common operation that deserves being short to type. Making it plain "revert" would violate expectations of existing users; it seems a better idea to just deprecate it, and point the users to the new method - cherry-pick --revert - or the command they might have meant - whatever that becomes. Sam.