I have a source file where 2 features have been added. In order to allow cherry-picking, I'd like to commit that in 2 phases: one for each feature. Until now, in similar situations, using git add -p
served me well, to commit one feature while leaving the local files in their final stage.
However, I now have the problem that git add -p
wants to stage a hunk that includes edits for both features. Even though the edits are on separate lines, s
(for "split") no longer wants to split up the hunk into smaller pieces...
In short: I can't separate the changes for the 2 features this way. Is there a way to manually edit the patch, for example using vi, without actually changing the original file?