![best diff tool linux command line best diff tool linux command line](https://www.tecmint.com/wp-content/uploads/2016/07/DiffUse-Compare-Text-Files-in-Linux.png)
It sounds like you want (1) color-coding or some other indicator based on where the source of a merged chunk came from, (2) want a way to distinguish the conflicts from the surrounding text, and (3) want to know the keys for selecting which file is in question.Īs a heads-up, I don't use three-way diff myself: I do two-way merges, so this is a quick skim myself over the the tools. I've had better luck with instead creating a new branch B2 off A2 and cherry-picking B into it. Rebase B onto A2 to attempt to create B2. Modify branch A to A2, commit -amend change into form that should go up.
BEST DIFF TOOL LINUX COMMAND LINE HOW TO
As long as you know how to "undo" the last merged chunk, you should be able to restore to a sane state.įinally, there's probably a Better Way To Do This In Git, but if you're using Git in the following scenario (where I usually get into these uncomfortable merge scenarios), you might be able to avoid the whole issue: You can use git show or whatever to check what you've done after-the-fact, so you should be able to sanity-check your work. Honestly, though, if you (a) prefer vim and (b) want to work in a terminal and (c) the issue is just not being familiar with vimdiff's keys, I'd probably just sit down and learn it. Plus, if you're already using vim, probably don't want The Other Editor.Īnother possibility (though I wholeheartedly agree on use of a terminal making it convenient to work anywhere, and being able to just reconnect is great) would be to mount the machine's drive via sshfs or similar and just run kdiff3 locally, if you're happy with it. However, without knowing what it is you are having problems with, you might dislike it as much as vim's diff.
![best diff tool linux command line best diff tool linux command line](https://media.geeksforgeeks.org/wp-content/uploads/20190930012351/finding_before_db_update.png)
The controls? The highlighting somehow differs? The window layout is trouble? Having single-key operations versus menu items is difficult? You normally use another editor and doing editing of the merged chunk in vim is trouble?Įmacs has a three-way merge as well, and I use its ediff for my own merging. These should all let you select whether you want a, b, or c versions for each chunk. There are other three-way merge tools, but without knowing what it is that you find difficult, it's hard to say "tool y is better" we're just giving names of other tools. Maybe you could expand on what differs that you find problematic? I tried vimdiff, but it's different enough that I made more mistakes with it than with kdiff3, which is unacceptable at work.