4 ms·
You’ll also want to familiarize with “git apply -3 <file name>”, for when a diff can’t be applied cleanly. It will try “harder” to merge (three way method) and
by johnrob 1y ago
You’ll also want to familiarize with “git apply -3 <file name>”, for when a diff can’t be applied cleanly. It will try “harder” to merge (three way method) and if it still fails it invokes the conflict merge “UX”:
<<<<<<<<<
=========
>>>>>>>>>
- smcameron 1y agoThere's also Neil Brown's "wiggle" program for applying patches that don't apply. https://github.com/neilbrown/wiggle https://github.com/neilbrown/wiggle although on debian based systems I think you can just "apt install wiggle"
- johnisgood 1y agoWhat does "applying patches that don't apply" mean exactly? I know about wiggle, but I have not used it, to be honest.
- smcameron 1y agoIt means that if you do "patch -p1 --dry-run < some.patch", and it complains that it doesn't apply, wiggle can sometimes apply it anyway, and also, if you do "patch -p1 < some.patch", and it partially applies but with rejected hunks, wiggle can try to apply the rejected hunks.