this post was submitted on 03 Nov 2025
58 points (98.3% liked)

Programming

23348 readers
226 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

Does anyone have a favorite diff tool for reviewing lots of code? I'm thinking something along the lines like meld or vimdiff. I don't really need a git client. I'm comfortable with the git CLI. I'm mainly interested in making code reviews a little easier to manage.

I'm reviewing a large code change right now and the web interface sucks. It's slow. It doesn't load all the files at once. Cross referencing files sucks.

I know, I know. "Code changes should be small." I've already voiced that to my team, yet here we are. I'm trying to figure out a way to make this a little less miserable.

top 28 comments
sorted by: hot top controversial new old
[–] Nighed@feddit.uk 1 points 9 minutes ago

The tortoise diff tool when doing most stuff.

Winmerge if I am manually comparing directories (it can do images/pdfs too!)

[–] Kissaki@programming.dev 2 points 3 hours ago* (last edited 3 hours ago)

I use GitLab diffs in single-file-view mode, TortoiseGit Merge when it exceeds what GitLab can reasonably display (including block indent changes I can ignore in TortoiseGit Merge or moves I can better track), and WinMerge (previously I used KDiff) for manual copy-paste text diffing (like copying blocks from the code change diff to compare similar, categorically similar code, or code moves, etc)

[–] refalo@programming.dev 1 points 13 hours ago
[–] fum@lemmy.world 14 points 1 day ago

My favourite is Meld

[–] KrenkoMobBoss@piefed.social 3 points 1 day ago
[–] wewbull@feddit.uk 3 points 1 day ago
[–] lehenry@lemmy.world 20 points 1 day ago

Difftastic is a structural diff tool that compares files based on their syntax.

https://github.com/Wilfred/difftastic

[–] ExtraMedicated@lemmy.world 2 points 23 hours ago

For comparing and selectively applying changes in many files, WinMerge is my tool of choice. But for resolving merge conflicts, I go with Tortise Git.

[–] tatterdemalion@programming.dev 14 points 1 day ago* (last edited 1 day ago)

Probably won't solve all of your problems, but I like to at least change git's default pager to delta.

[–] 6nk06@sh.itjust.works 14 points 1 day ago (2 children)

Beyond Compare, the pro version that does 3-way merges and stuff. I tried them all and its the best for a cheap price if you use it a lot.

[–] Brosplosion@lemmy.zip 2 points 18 hours ago

Seconding beyond compare. It's been the best by far and also supports network copy

[–] flubba86@lemmy.world 1 points 18 hours ago

My current workplace only allows whitelisted applications to run, and you must install them via the company portal. At my old workplace I used Linux with Kde Plasma, and Meld. New workplace has windows 11 only, and I was trying to find a replacement for Meld. When I started here, I noticed Beyond Compare is on the list. I'd heard of it before, but never used it. I installed it and it's great! So happy that's the one diffing tool they allow.

[–] tal@lemmy.today 7 points 1 day ago* (last edited 1 day ago)

I use emacs's magit for git stuff (the bulk of things) and emacs's ediff for most other things.

Good if you know emacs, but hard to recommend using it for someone who doesn't.

EDIT: Oh, one exotic utility that's useful for some rare cases, not really for interactive merging of code


wdiff for word-level diffing. Most code can reasonably be diffed on a line-by-line basis, but that's not true for some text formats, which can have very long lines. Human, natural language in text format, is one good example.

[–] curiousfurbytes@programming.dev 3 points 1 day ago (1 children)

I've been using delta for a while, alongside lazygit, and enjoying it.

[–] arran4@aussie.zone 4 points 1 day ago

I like kdiff3, vimdiff, and ... intellij. Kdiff3 and intellij do "directories / file structures" too but I'm not sure the level you want it. Neither are cli though.

[–] Fmstrat@lemmy.world 3 points 1 day ago
alias diff='diff --width=$COLUMNS --suppress-common-lines --side-by-side --color=always'
[–] MajorHavoc@programming.dev 4 points 1 day ago (1 children)

I'm mainly interested in making code reviews a little easier to manage.

One thing I haven't seen mentioned yet, here: All future diffs become much easier to read if the team agrees to use a very strict lint tool.

I know, I know. "Code changes should be small." I've already voiced that to my team, yet here we are.

I understand from another Lemmy thread that the tradition is to toss the offending team members' laptop into the nearest large body of water.

[–] paequ2@lemmy.today 3 points 1 day ago

the tradition is

LOL! Booking a meeting now! Tradition is tradition!

[–] lame_potato@lemmy.blahaj.zone 3 points 1 day ago (2 children)

I've been using SmartGit for about a decade now. While I don't typically need a git GUI, I do appreciate it's diff'ing and 3-way merge.

It's free for open source use and they do have a lifetime license option to avoid the subscription for commercial use.

+1 for smartgit. I just use jet brains built in git guis now but whenever I'm doing some crazy rebasing I open up smartgit. I like how it also shows you the commands in the log so you can learn by doing.

[–] TehPers@beehaw.org 1 points 1 day ago* (last edited 1 day ago)

I bought a license many, many years ago and loved SmartGit. I just use the cli now, but if you're looking for a GUI, it's a great choice.

[–] litchralee@sh.itjust.works 4 points 1 day ago

I like vimdiff, since it's fair quick to collapse and expand code chunks if you know the keyboard shortcuts. Actually, since it's vim, knowing the keyboard shortcuts is the entire game lol.

I usually have vimdiff open in a horizontal pane in tmux, then use the other horizontal pane to look at other code that the change references. Could I optimize and have everything in a single vim session? Sure, but at that point, I'd also want cscope set up to find references within vim, and I'm now trivial steps away from a full IDE in vim.

.... which people do have, and more power to them. But alas, I don't have the luxury of fastidious optimization of my workflow to that degree.

[–] GammaGames@beehaw.org 3 points 1 day ago

I just have a script that has a few commands with presets to see the differences I care about:

Short diff: git diff -w --ignore-blank-lines --color-words='\w+|.'
Slightly longer diff: git diff -w --ignore-blank-lines

[–] e8d79@discuss.tchncs.de 2 points 1 day ago

I like the merge and diff tool integrated in the various Jetbrain IDEs.

[–] eager_eagle@lemmy.world 2 points 1 day ago* (last edited 1 day ago)

yeah, I was also after a CLI tool for that because my goto is a 3-way merge in a GUI editor at this moment. I just didn't find any CLI tool that beats that in usability and visuals (syntax+diff highlighting)

For simple diffs, my favorites are difftastic and Delta.

[–] whotookkarl@lemmy.dbzer0.com 1 points 1 day ago

Gnu diff for the basics or if I want something automating diffs, beyond compare or winmerge if I'm stuck with windows for gui tools.

[–] portnull@lemmy.dbzer0.com 1 points 1 day ago* (last edited 1 day ago)