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).
| Action | Does |
|---|---|
| Show diagram | Draws that branch on its own, without checking it out. |
| Compare diagram with '…' | Diffs your branch against that one, flow by flow. |
| Diagram of uncommitted changes | Diffs your working tree against the last commit. |
| Show diff with '…' | Opens the plain file diff. |
| Swap | Exchanges base and head. |
| Stop comparing | Back to the branch alone. |
| Checkout | Checks 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.
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.
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.