Use peekcode

Compare changes

Diff a flow against another branch, a pull request, a worktree or your uncommitted work.

Press ⌘⇧B to open Pick a branch or compare. Search covers branches and pull requests. Its sections are Local, Worktrees and Pull requests (or Merge requests on GitLab).

ActionDoes
Show diagramDraws that branch on its own, without checking it out.
Compare diagram with '…'Diffs your branch against that one, flow by flow.
Diagram of uncommitted changesDiffs your working tree against the last commit.
Show diff with '…'Opens the plain file diff.
SwapExchanges base and head.
Stop comparingBack to the branch alone.
CheckoutChecks the branch out. See below.

Like a pull request, Compare measures a branch from the point where it left the other branch (the merge-base), so commits made on the base since then don't show up as changes. When the branch you are viewing gets new commits, the report is analyzed again, and it shows which commit it is on.

Reading a diff

  • Modified blocks show lines added and removed. A finer mark says what changed: target, signature, condition, transaction, body or overload.
  • New marks blocks, calls and resources the branch adds; removed ones are crossed out.
  • Checks are compared too: new guard, guard removed, guard changed.
The branch makes returns.statsByCustomer read a new table, marked New.

Only what changed

A long flow can hide a three-line change. Turn on Changes in the view rail (Show only changed steps) and the diagram folds everything except the changed steps and the path to them.

From the whole flow to the changed steps inside a try and an if.

Checkout with local changes

If checking out would overwrite your changes, peekcode asks: Smart Checkout stashes them, checks out and puts them back; Force Checkout discards them; Don't Checkout cancels. Settings → Source code → Git can make Smart Checkout the default.