News for hackers. Stuff that matters.
Re:Git cherry-pick and revert use 3-way merge by juped on Friday November 10, 2023 @02:08PM (#38223096)
You can set the config option `merge.conflictStyle` to `diff3` to see all three inputs to a merge conflict (left, base, and right, rather than just left and right); this lets you actually resolve them, because you can see the changes left made to base, and the changes right made to base, and make both changes, rather than having to guess at what's going on.

I wish this were the default. (It's not broadly because it displays certain arcane recursive merges in a really bizarre way; see the mailing list for discussion.)

Re:Git cherry-pick and revert use 3-way merge by Amorymeltzer on Friday November 10, 2023 @03:35PM (#38224147)
I made the change a few years ago, and never looked back. It can take a little adjusting to at first, because it's not super clear exactly what you're looking at, but it's definitely worth it. For the "simple" cases you're no worse off, but for the gnarly conflicts it's such a huge help to have the full context there.

----

Truth be told, I use zdiff3, the "zealous" diff3, where git >= 2.35[1] is available. Some good examples/thoughts at https://stackoverflow.com/a/71254097/2521092 and https://stackoverflow.com/a/70387424/2521092

1: https://github.blog/2022-01-24-highlights-from-git-2-35/

Re:Git cherry-pick and revert use 3-way merge by secondcoming on Friday November 10, 2023 @04:23PM (#38224726)
I recommend the p4merge tool for visualising 3-way diffs.