Markus Roberts wrote: > Yeah, I know. My coefficient of curmudgeonosity is abnormally high > the past 20 hours or so. My frustration is that when I wind up > making cleanups in the process of finding the fix and it takes much > longer than I felt like it should have I'm not relishing the task of > remaking them all to sort out which is which. Doing them as > independent micro-commits and sorting before squashing is a > nightmare if the affected lines overlap. The easiest is generally > to reintroduce the bug in the cleaned up version, make that a > commit, and then take it out again for the second commit. But it > still seems onerous when I'm grumpy (normally I'd just suck it up & > deal).
I find that using the technique outlined in the git-rebase(1) section
"SPLITTING COMMITS" to tease apart the changes in a commit is not too
bad.
If you've not used that, it's worth a try.
Basically, you use 'git rebase -i <commitish>' and mark the commit you
want to split with 'edit'. Then use 'git reset HEAD^' to rewind the
index but leave the changes in the work tree. Then use 'git add -p'
to stage the changes you want for each separate commit.
--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I refuse to spend my life worrying about what I eat. There is no
pleasure worth foregoing just for an extra three years in the
geriatric ward.
-- John Mortimer
pgp8jmkaBQAoZ.pgp
Description: PGP signature
