User guide / Git

Diffs

Development reference · View source

KeyOpens
Space g dThe active file’s unstaged patch
Space g DTwo complete, aligned versions: index on the left, working tree on the right
Tab iEverything staged for the next commit
  • In the changed-file list, Space g d and Space g D follow the selected row, so a staged row compares HEAD with the index.
  • A missing side of an added or removed file is shown as hatched filler.
  • Patches are coloured by line: added and removed lines in the gutter colours, hunk positions in the accent colour, headings muted. The same colouring applies to all generated patch views.

The side-by-side pair is temporary. Closing either pane removes the split and returns the surviving pane to the buffer active before the comparison. :diff-off (:do) does the same from either side. If that buffer has since been closed, the pane opens the workspace explorer.