From: Miklos Vajna Date: Fri, 27 Jun 2008 13:49:08 GMT Subject: Re: An alternate model for preparing partial commits Message-ID: <20080627134908.GA428@genesis.frugalware.org> In-Reply-To: On Fri, Jun 27, 2008 at 02:33:33PM +0100, Johannes Schindelin wrote: > Having said that, I played with the idea of a "git stash -i", which would > allow you to select the changes to stash away. (And by extension, "git > stash -e" using the "git add -e" command.) If we are at it, git checkout -i is also something which may be useful, like: 1) Do two unrelated changes in a file. 2) You realize one of them is unnecessary. Currently what you can do is something like: 1) You stage the first hunk using git add -p 2) git commit 3) git checkout file But this forces you to commit early, and to commit --amend later. It would be nice to be able to completely drop a hunk without first commiting. (Feel free to point out if this is something bad, I just remember from the past that darcs revert - which is like git checkout - had such an interactive mode.)