Scenario: I have a patch file that applies cleanly to my working files, but I do not want all the changes from the patch.
Usually, I do vim example.patch
, remove unwanted changes and them apply patch -p0 -i example.patch
but at times the patch does not apply cleanly, and I have to start over again.
Is there a patch file editor that allows users to edit and delete part of the patch and still can apply cleanly ?
If you open a diff file in emacs and put the editor in "diff" mode you can actually edit patches and it will update the hunk markers in a smart way.
Make a new branch starting from the revision just before the first changeset. In the new branch, merge each changeset of the issue, in order. Take a diff between the start of the new branch and the final result. (If you do issue-based branching, you'd get the above situation automatically).
If you open a diff file in emacs and put the editor in "diff" mode you can actually edit patches and it will update the hunk markers in a smart way. Works really well for me!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With