Reading a diff

Inline or side by side, with the changed words picked out inside the changed lines.

Selecting a file — in the working copy, in a commit, in a comparison, in a stash — shows its diff in the right-hand column.

An inline diff, with the changed range inside the modified line picked out.

Two layouts, and how you get each

Inline puts removals and additions in one column, in file order. It reads well for small changes and for anything where the order of the lines is the point. It is what the column shows, always.

Side by side puts the old file on the left and the new one on the right, with the line numbers kept in step. It reads better for a rewritten block, where inline shows you fifteen removed lines followed by fifteen added ones and side by side shows you which became which.

There is no toggle between them. Side by side is what the Diff Review window shows, and the button that opens it says so — Open side-by-side review window, at the right-hand end of the diff header. Which layout you are reading follows from where you opened the diff, which is why a column a third of a window wide is never asked to hold two of them.

Both layouts mark the exact changed range inside a modified line, so a line where one argument changed does not read as a line that was rewritten.

Syntax highlighting

Patches are highlighted by language, which is what makes a diff scannable rather than a wall of monospace. It works in both layouts and in every place a diff appears.

What else is in the header

Above the diff: the file’s path, buttons to open the file in your editor and to stage, blame or discard it, and four controls that change how the diff is drawn — wrapping, whitespace markers, the minimap, and how much context to show.

Finding text

⌘F opens a find bar for the loaded diff. Finding text in a diff explains how to move between matches and how context affects the search.

Text size

View ▸ Increase Font Size (⌘+) and View ▸ Decrease Font Size (⌘-) make the code larger or smaller, from 10 to 24 points, and View ▸ Reset Font Size (⌘0) puts it back. The size applies to every diff, to the conflict editor and to blame, and Innesta remembers it. What you were reading and what you had selected stay where they were.

Very large diffs

A diff too large to open straight away is shown as plain text under a Large diff banner, so scrolling stays smooth. You can select it, or take all of it with Copy complete diff.

Show Diff, on the banner, swaps the text for the usual diff — inline in the column, side by side in the Diff Review window, with staging by hunk or line — leaving syntax colours and the minimap off. It works for diffs up to about 2 MB and 6,500 lines; beyond that it is unavailable, and its tooltip says why.

Images

A changed image is shown as an image rather than as a description of bytes, for the formats macOS can display.