5 ms·
Ask HN: What is your favorite tool to resolve Git merge conflicts?
- ZeroGravitas 3y agoThere's a big long nerdy blog post about it (where I learned this technique) but basically many tools will throw away information and take you back to the start of a tricky merge. With the right settings, you can leave all the easy bits done and see exactly what caused the problem. I think the guy was campaigning to make it the default so it may be in some tools now. I'll see if I can Google it up. edit, think this is it: https://www.eseth.org/2020/mergetools.html https://www.eseth.org/2020/mergetools.html
- ctenb 3y agoThanks for the link. Looks like a thorough article. I'll defs give it a read.
- zachmjr 3y agoI use IntelliJ for that: https://www.jetbrains.com/help/idea/resolve-conflicts.html https://www.jetbrains.com/help/idea/resolve-conflicts.html
- jaycox2931 3y agohttps://github.com/akinsho/git-conflict.nvim https://github.com/akinsho/git-conflict.nvim if you're into neovim
- ctenb 3y agoI've used kdiff3 a lot on windows. It's not bad, shows a readable 3-way-diff format (which I need to stretch over two screens to read the full lines). Reasonably fast startup too. But it lacks any sort of advanced editing functionality, such as undo.
- btschaegg 3y agoMight be too late already, since this is already 8h old and does not have too many answers, but: As for me: A text editor and a text search for `<<<<`. Now as for why, and in the hopes that someone here could give me a hint to better existing tooling: I usually run into conflicts with `git rebase`, not `git merge`. And no tool I have available gives me the important information about a conflict when rebasing a longer branch: - What exactly is the conflicting commit I'm currently rebasing? How does its diff look like? - What is the conflicting commit on the target branch? How does its diff look like? Note that those two questions are much more important than the "snapshot 1, snapshot 2, result" view most merge tool provide. A conflict means two commits change the same region of code for reasons, and those reasons matter. It's mostly understanding them that makes the resolution possible, and reconstructing that information can be a huge headache. Anyone know about such history-aware tooling for handling merge conflicts?