Text Diff

A text diff highlights the changes required to transform one text file into another.

Layout

Unified View text diff

There are three layouts:

To switch between them use the View menu or the segmented control (top right).

Layout Coloring

Example: Delete hunk (red) with selection on line 12

Editing

These actions are available from the menubar, right click menu, or using keyboard shortcuts.

A patch file contains the operations that transform the left side into the right side. Patch files can later be applied using patch left-file exported.patch.

Copy actions are not available when the selected content already matches the destination or when the selection is not on a real line –for instance, an alignment placeholder row.

View Options

Text diff exposes options that change how the comparison is computed or displayed. These options are available in the Funnel button (top right).

Compare Against Git Revisions

To compare a file against a previous revision choose Load previous.

Diff placeholder

When files are under version control, they display a tag that reveals their Git history.

Git history

When available, the filename area shows a revision label such as:

Use the revision control to load a different version of the file into a pane. This is useful for reviewing changes over time without leaving the comparison view. Accessing Git revisions requires explicit permission. See Settings and Disk access for App Store apps for details.

Keyboard Cheatsheet

Action Shortcut
Previous / next row ↑ / ↓
Jump to first / last row ⌘↑ / ⌘↓
Previous change / next change ⌥↑ / ⌥↓
Switch to other pane
Copy to right ⌘→
Copy to left ⌘←
Previous / next change ⌥↑ / ⌥↓
Extend selection ⇧↑ / ⇧↓
Resolve with Ours ⇧⌘→
Resolve with Theirs ⇧⌘←