How to view a git diff in cmux
There are three ways to read a branch diff in cmux. Run cmux diff for the built-in viewer, git diff main...HEAD in a pane for a quick answer, or npx diffhub@latest cmux for a browser split that refreshes while you keep editing. Which you want comes down to how big the branch is, and whether it’s still moving.
What does cmux diff actually do?
cmux has shipped its own diff viewer since June. I’d already built one.
Run cmux diff and you get a searchable branch-base picker, syntax highlighting on changed lines, and review comments that persist per repo. The picker landed in v0.64.20 in July. The comments landed back in v0.64.15, in June.
It isn’t in the published CLI reference, so it’s easy to conclude it doesn’t exist. It does. And if you’ve seen --staged or --unstaged flags described for it, those belong to other tools: the AI summaries have been attributing them to the wrong command.
For a quick pass over what an agent just changed, it’s the fastest thing available and it costs nothing to install.
Why doesn’t cmux diff refresh while you edit?
It doesn’t watch the filesystem yet, and it opens in a fixed pane wherever you ran it from. Both are open issues, #7101 and #7102. So the loop where you read a diff, fix something, and want to see the fix still means reopening it.
When should you use DiffHub instead?
Use DiffHub when the branch is still moving. That’s the gap DiffHub sits in.
npx diffhub@latest cmuxIt opens in a browser split, compares against the detected base branch, usually origin/main, and refreshes while you keep editing. There’s a split and unified toggle, a filterable file sidebar with per-file + and - counts, and right-click to open a file in Zed, VS Code, Terminal, or Finder. It runs in an ordinary browser tab too, which a viewer built into a terminal can’t.
If you only want to answer one question, skip all of it and run git diff main...HEAD in a pane. The three-dot form diffs from the merge base, so you see what the branch introduced rather than every difference between two tips.
What are the alternatives to cmux diff?
A few people have built for this, and they make different trade-offs. Star counts are a crude signal, and they’re here anyway: they’re the one number on this table you can check in a click.
| Tool | Written in | Stars | What it adds |
|---|---|---|---|
| cmux-hub | TypeScript | 40 | Inline review comments, commit history, GitHub PR status |
| cmux-git-diff | Go | 6 | A single Go binary, staged and unstaged tabs, live reload |
| cmux-diff | TypeScript | 4 | Shiki highlighting and commit message suggestions |
| revdiff | Go | 760 | A TUI, if you’d rather not leave the pane at all |
| DiffHub | TypeScript | 19 | A browser split that refreshes while you keep editing |
Language and star counts read from each repository on 2026-08-10.
Turns out what separates them isn’t the diff rendering. It’s whether the view keeps up with you while you work.
Widen it past cmux and the field is bigger. How to review code an AI agent wrote compares these against hunk and revdiff, and says which one to pick.
cmux will probably close that gap. Until then I’ve got a tab open.
What else do people ask about git diffs in cmux?
Does cmux diff refresh automatically while you edit?
Not yet. Live reload is cmux issue #7101, and choosing the pane it opens in is #7102. Both were still open on 2026-08-10.
Is cmux diff documented?
Not in the published CLI reference at cmux.com/docs/api, which is why people conclude it doesn’t exist. It does. Any --staged or --unstaged flags you’ve seen described for it belong to other tools.
What is the difference between two dots and three dots in git diff?
Two dots compares the two branch tips. Three dots compares from the merge base, so you see what your branch introduced, not everything that’s landed on main since. Three dots is almost always the one you want.
Can you review a branch in cmux without installing anything?
Yes. git diff main...HEAD in a pane costs nothing, and cmux diff ships with cmux from v0.64.20 on. Neither needs an install.
Changelog
- : Replaced the list of alternatives with a comparison table, and added an FAQ.
- : First published. cmux version numbers and the two linked issues checked on this date.