compare

Compare any two points in the history.

Nobody remembers the syntax for diffing one file between two branches. You remember where the two commits are, because you are looking at them.

Point, point, read

Shift-click a commit, or press B, and it becomes the comparison base. Select a second commit and the range between them opens as a diff. The order is not something you have to get right first time: the ends can be swapped, and the base stays marked in the graph so you can always see which two points you are reading.

This never starts a merge. Comparing is reading, and reading should not be able to change the repository - so nothing here does.

A branch against the base it grew from

Stack compare takes the current branch tip and the base branch it came from, which is the question behind "what is actually in this pull request". It needs both ends to exist; when one is missing, it says which one rather than guessing.

Uncommitted work is not a comparison base

Your working tree is not a commit, and pretending it is produces a diff that changes under you while you read it. FluxGit refuses that case out loud - "select a real commit first" - instead of showing something that looks like an answer.

The working tree still has its own diff, with staging down to the individual change. It is simply not one of the two ends of a range.

Related features

  • Visual history is where the two points are picked, with refs, tags and remotes in view.
  • Stage part of a file is the same diff, applied to the work you have not committed yet.
  • Semantic diff reads a range structurally where the language can be parsed.
  • Branch stack explains parallel and stacked branches without inventing hidden ones.