Re: how to split a hunk
- From
Thomas Rast <trast@student.ethz.ch>
- Date
- Oct 28, 2009, 13:06 UTC
- Message-ID
- <200910281406.12923.trast@student.ethz.ch>
- In-Reply-To
- <20091028022105.GE3938@debian.b2j>
bill lam wrote:
Show 10 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?
There's also the 'git add -p' [e]dit feature, which pops up the patch in an editor. There are instructions in that file, but in this case, you can simply remove one of the additions.
--
Thomas Rast
trast@{inf,student}.ethz.ch