Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
colejohnson66
· 3y ago · 0 comments
Doesn't this come from git itself? If you try `git add -p <file>`, it'll chunk just as "bad".
Comments
[–]
YellowSuB
3y ago
Yes, git generally stages just hunks with the patch add mechanism, but it is possible to stage single lines, but it is a bit tedious, see:
https://kennyballou.com/blog/2015/10/art-manually-edit-hunks...
[–]
nerdponx
3y ago
You can edit the hunk manually. I believe it's also possible to construct a hunk to apply entirely from scratch as long as you get the header right.