4 ms·
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 rig
by juped 3y ago
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.)
- Amorymeltzer 3y agoI 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 https://stackoverflow.com/a/71254097/2521092 and https://stackoverflow.com/a/70387424/2521092 https://stackoverflow.com/a/70387424/2521092 1: https://github.blog/2022-01-24-highlights-from-git-2-35/ https://github.blog/2022-01-24-highlights-from-git-2-35/
- secondcoming 3y agoI recommend the p4merge tool for visualising 3-way diffs.