4 ms·
Having untangled ideas using hunks, when diff doesn't choose the desired boundaries I'm not quite sure it's worth it. Certainly an engaging exercise.
by hyp0 13y ago
Having untangled ideas using hunks, when diff doesn't choose the desired boundaries I'm not quite sure it's worth it. Certainly an engaging exercise.
- cjp 13y agoYou can split hunks down to individual lines. Also git-gui can stage individual lines.
- MatmaRex 13y agoYou can, but last time I tried it was only via editing the diffs ('e' command in `git add -p`), which is unpleasant and sometimes pretty annoying (ah, how many times I missed the leading space on context line to have it shout at me with incomprehensible errors). (And yeah, I'm just using `git gui` for this now.)
- saidajigumi 13y agoAgreed, I don't tend to use `git add -i` much directly either. I use editor integrations and/or a GUI tool that allows line-by-line staging. I rather like Git Tower's[1] approach: it's easy to stage directly in the diff view either by hunk or by selected lines. This works nicely because most of the time the diff hunk(s) are OK, and I only need to mess with a selection in the less common cases. [1] http://www.git-tower.com/ http://www.git-tower.com/