Re: how to split a hunk
- From
- Geert Bosch <bosch@adacore.com>
- Date
- Oct 28, 2009, 03:11 UTC
- Message-ID
- <21963906-785A-4D98-8AD8-A89ED914920C@adacore.com>
- In-Reply-To
- <20091028022105.GE3938@debian.b2j>
On Oct 27, 2009, at 22:21, bill lam wrote:
Show 11 quoted lines
> There are occasions where diff of a file is > > - aaaa > + bbbb > + cccc > > I want to add lines bbbb and cccc as separated commits, but git-add -p > seem cannot further split this hunk. Do I have no choice but to edit > it by hand and commit the bbbb and then edit the file to add back the > cccc? >
I like to use "git gui" for this. This allows you to pick individual lines to commit. I really like the "git gui" interface for staging/ unstaging changes and making a series of commits.
-Geert