Skip to content

The Diff Viewer

Garrett Speager edited this page Oct 6, 2026 · 2 revisions

The Diff Viewer

The same diff viewer shows up throughout the app — in Working Copy, commit details, History, and the branch-compare view. It works the same way everywhere.

Reading a diff

  • Toggle between side-by-side and unified view.
  • Wrap lines in the diff toolbar turns line wrapping off, so each line stays on one row. Side by side, each half then has its own scroll bars, and scrolling one side scrolls the other to match; unified, the diff scrolls sideways. The choice is remembered everywhere in the app.
  • Changed lines are highlighted down to the word level, not just the whole line, so you can see exactly what changed.
  • Code gets syntax highlighting.
  • Long stretches of unchanged lines collapse automatically — click to expand them if you need the context.
  • Press Alt+↑ / Alt+↓ to jump between changed hunks without scrolling manually.

Acting on a hunk

Where staging applies (Working Copy), each hunk has its own Stage, Unstage, and Discard buttons — you don't have to stage or discard an entire file at once. Discarding a hunk always asks for confirmation.

Staging single lines

Click the line number of a changed line to select it; Shift-click another to select every changed line in between. The hunk's buttons then act on just those lines — Stage 2 lines, Unstage 1 line, and so on. Discarding selected lines is available for unstaged changes.

Special cases

  • Whitespace — an "Ignore whitespace" checkbox hides whitespace-only changes. You can set the default for this in Settings.
  • Images — PNG, JPEG, GIF, WebP, BMP, ICO, AVIF, and SVG files are shown as images: side by side, with a swipe slider, or as an onion skin that fades one over the other. SVG files can switch between the image and their text diff.
  • Other binary files — shown as a placeholder rather than an attempted (and meaningless) text diff.
  • Submodules — a changed submodule lists the commits it moved between, instead of two commit hashes. See Worktrees & Submodules.
  • Git LFS files — labelled LFS in Working Copy, and show their size change instead of the pointer text Git stores. If Git LFS isn't installed, the diff says so.
  • Large files — files over 1 MiB show a size warning instead of rendering immediately, with a "Load anyway" option. This protects against the app freezing on huge files.

Opening elsewhere

Any diff can be opened in your configured external diff tool instead, if you prefer it for a particular comparison.

Clone this wiki locally