From: Elijah Newren Date: Sat, 01 Nov 2008 19:57:54 GMT Subject: Re: [PATCH] Documentation: add a planning document for the next CLI revamp Message-ID: <51419b2c0811011257v74a75053la59755e7dabe2f09@mail.gmail.com> In-Reply-To: <4909CC85.1080803@op5.se> Hi, On Thu, Oct 30, 2008 at 9:02 AM, Andreas Ericsson wrote: > I like it, although I guess one would have to add a "--staged" flag to > git revert-file to be able to checkout files from index as well, or people > will wonder why that can't be done. Ew. 'git revert-file --staged foo'? If you want to revert the *unstaged* changes of a file, it should be 'git revert-file --unstaged foo'. I would expect 'git revert-file --staged foo' to revert the staged changes in foo, i.e. it should do what 'git reset -- foo' does (except that it should also work for the initial commit). Thus, there'd be little need for a --staged flag to revert-file, unless we allowed reverting individual files back to some revision prior to HEAD (like bzr and hg do)...