From: Sverre Rabbelier Date: Mon, 13 Apr 2009 16:59:43 GMT Subject: Re: [PATCH] git-add: introduce --edit (to edit the diff vs. the index) Message-ID: In-Reply-To: Heya, On Mon, Apr 13, 2009 at 18:19, Johannes Schindelin > Would not a much saner way be > >        $ git reset HEAD^ >        $ git add -p >        $ git stash save --keep-index >        # test it >        $ git commit >        $ git stash apply >        # test again >        $ git commit That's what I do already, but now imagine that at the # test it step I notice that I staged too much, or need to tweak some value only in this commit (e.g., change test_expect_success to test_expect_failure because this commit is the test that indicates the failure, and the next one will fix it and flip from expect_failure to expect_success). At the moment I have to make the change in my working directory (which potentially involved deleting a lot of hunks), stage that and _then_ make my commit. With 'git add -e' I can make the fix and happily continue. -- Cheers, Sverre Rabbelier