On Fri, Jul 24, 2009 at 09:06:16AM -0700, Junio C Hamano wrote:
FWIW it's what I was doing so far, and it's not very efficient for many
patterns, you talked about the bit where you want to keep some of the
debug, for this one I used to do that:
while I have meaning full commits to do:
git add -p; commit;
git add -p the things I want to trash and commit
git stash
git reset --hard HEAD~1
git stash apply
That sucks.
Another thing is that: if you have _many_ commits to do, you have to
refuse the same hunks (or worse edit) all over the place. That's awful.
With an "undo", you look at them once only. That's a lot of thinking
saved, and when you have a lot of hunks, less chances to mess an answer
(who here hasn't typed 'y' where he meant 'n' at least once ...)
For all those reasons I believe it's a good thing to be able to have
something to remove hunks from the working-directory. Jeff's suggestions
to move them to some stash is the best suggestion so far, and is safe.
--
Intersec <http://www.intersec.com>
Pierre Habouzit <pierre.habouzit@intersec.com>
Tél : +33 (0)1 5570 3346
Mob : +33 (0)6 1636 8131
Fax : +33 (0)1 5570 3332
37 Rue Pierre Lhomme
92400 Courbevoie