Docs menu

Reviewing branches

.md

Checkout-free review: triage a fleet of branches, read diffs, and merge from the CLI or web.

When agents do the work, review becomes the bottleneck: ten branches come back, and switching your checkout ten times to read them isn't an option. Everything on this page is checkout-free โ€” it reads the server (or your local repo) and prints, without touching your working tree.

Triage first#

oak branch triage --remote                    # every open branch, scored
oak branch triage --remote --only mergeable   # just the ones ready to land
oak branch triage --remote --json             # for an agent doing the triage

Each row carries:

FieldValues
Mergeabilityclean, conflicts
Contributioncontributes; or empty / superseded_exact for a branch that adds nothing main doesn't already have
CIthe branch head's CI status
Recommended actionvalidate_then_merge, resolve, close, rebuild, review, do_not_merge

--only mergeable | closable | ambiguous sorts a fleet before you read a single diff: land the first bucket, close the second (agent runs that produced nothing new), and spend your attention on the third. --analysis-depth trades speed for depth, --limit N caps how many branches get the deep pass, and --against <branch> compares against something other than main.

Review one branch#

oak branch review fix-auth--a1b2c3d4 --remote --merge-preview

oak branch review gathers the evidence for one branch: what it changed, what it's based on, and โ€” with --merge-preview โ€” whether it would merge cleanly, plus a merge-safety verdict that flags a prediction which would destroy work already on main. Add --json for agents.

Read a diff without switching#

oak diff fix-auth--a1b2c3d4                     # full-screen viewer: what the branch contributes
oak branch diff fix-auth--a1b2c3d4 --remote     # summary of changed files
oak branch diff fix-auth--a1b2c3d4 --remote --print          # the patch, to stdout
oak branch diff fix-auth--a1b2c3d4 --remote --json --hunks   # the patch, as JSON
oak diff 3f9fab02 8fcf5aed                      # any two commits

Branch diffs come in three modes, chosen with --diff-mode (oak branch diff) or --mode (oak diff):

ModeAnswers
contributionWhat did this branch add since it forked from main? The honest "what did the agent do".
treeHow do the two heads differ right now? (Default for oak branch diff.)
net-mergeWhat would main gain if this branch merged now?

For large branches, --changed-files-limit / --changed-files-offset page through the file list and --max-bytes caps the patch text in JSON output.

Preview a merge train#

oak branch train fix-auth--a1b2 add-search--e5f6 bump-tokio--c9d0 --remote

oak branch train previews landing several independent branches in order โ€” would each still merge cleanly after the ones before it? โ€” without publishing anything. Up to 32 branches.

The full-screen viewers#

oak diff and oak log open full-screen on a terminal. Both take the keys you already know:

StyleKeys
Arrowsโ†‘ โ†“, PgUp / PgDn, Home / End
less / vij k, Space (page down), b (page up), d / u (half page), g / G, / to search
emacs^N / ^P, ^V / M-v, M-< / M->, ^S to search, ^G to cancel

In oak diff, Tab or the arrow keys move between the file tree and the diff pane, and Space folds a directory in the tree. Press ? in either viewer for the complete list. Pipe the output, or pass --print / --json, to skip the viewer.

In the browser#

The repo's Branches page on oak.space lists every open branch with its description and a CI status chip. Each branch opens a detail page with:

  • the full diff, file by file;
  • per-workflow CI pills that link to live run logs;
  • a Seen by list โ€” opening a branch page records that you've read it;
  • Merge, Update (merge the latest main into the branch), and Close / Reopen buttons, plus conflict resolution in the browser when a merge would conflict.

Check several branches on the list and Merge selected lands them one after another โ€” usually how a fan-out ends when the branches don't overlap.

Then land it#

oak switch fix-auth--a1b2c3d4     # fetches it if needed
oak merge --wait                  # wait for CI, then squash onto main

See Merging and conflicts.

Something here wrong or missing? Run oak feedback -m "โ€ฆ" or email [email protected].