2 ms·
> I do burn myself occasionally by having an unrelated edit that is in a hunk that can't be split- I suspect there are tweaks to diff I could make to help with
by palata 3y ago
> I do burn myself occasionally by having an unrelated edit that is in a hunk that can't be split- I suspect there are tweaks to diff I could make to help with that but have yet to overcome my apathy wrt research.
`git add -p` allows you to "edit [e]" the patch, meaning that you can really decide exactly what should be added. And that's a great opportunity to learn how to manipulate patches, which is an important skill IMO!
- gooseyard 3y agowell im a dope, I never noticed the edit option. So if I edit the hunk and toggle the subset of changes I don't want, I'll get prompted to accept the diff of the diff? brb I need to go try this.
- gooseyard 3y agohigh five I won't need to worry about this again
- palata 3y agoI'm glad it helps! \o/
- newusertoday 3y agoin magit you can also select lines you want to commit. It's there in the article as well