Compare commits and branches before reviewing a change
Choose between a single commit, a direct comparison, and "since branches diverged," check the direction, and review against fixed commits.
Before you start a review, decide which question you’re asking. “What did this commit change?” and “What has this branch changed since it split off?” can produce different diffs, even for the same branch names.
Looking for a Mac app to read committed changes? See Yenpo’s Git diff viewer workflow and limits before following the steps below.
Open a comparison
To review a feature branch against main, use the following steps, replacing the example names with your branches:
- Open the local Git repository and click Compare Versions… in the sidebar.
- Switch from Commit to Compare.
- In From (base), select Local branches and choose
main. In To (head), select Local branches and choosefeature. Each column has its own branch source and search field. - Choose Since the branches split for the work on
feature, or Direct comparison to compare the two tips. The next section shows why the results differ. - Check the branch names and short commit IDs in the summary. Use Swap if the direction is wrong, then click View Changes.
- Select a file in the changed-file tree to read its inline diff.
To use origin/main instead, choose Remote branches in the From column. These are remote-tracking refs already stored in your local repository, not a live view of the server. If you need newer remote commits, update the repository with your usual Git client, then reopen the comparison picker.
Yenpo pins the comparison to specific commits. If a branch moves later, your review stays on the commits you picked. To review the new tip, open a new comparison.
Choose a mode
| Question | Mode | Compares |
|---|---|---|
| What did one commit change? | Commit | Its first parent → that commit; a root commit is compared with an empty tree |
| How do two branch tips differ right now? | Direct comparison | Base tip → head tip |
| What has head changed since the branches split? | Since the branches split | Merge base → head tip |
Take this history:
M1──M2 main
/
O───X
\
F1──F2 feature
A direct comparison of main → feature compares M2 with F2, so it includes work done on both sides. Since the branches split compares X with F2, which is usually what you want for “what did feature add?” It doesn’t simulate the final merge, and it can’t tell you whether the merge will conflict.
For a merge commit, Commit mode compares against the first parent only. That’s one view of the merge, not a diff against each parent, so make sure it answers your question.
Check the exact revision pair
Hover over the revision line above the changed-file tree to see the full commit IDs. In Direct comparison, they are the selected From and To commits. In Since the branches split, the base is labeled merge-base(...) and its ID is the shared ancestor, rather than the tip of the From branch.
To check those same versions in Git, run these read-only commands from the repository. Replace BASE_COMMIT_OID and HEAD_COMMIT_OID with the two full IDs shown in Yenpo:
git show --no-patch --format='%h %s' BASE_COMMIT_OID HEAD_COMMIT_OID
git diff --stat BASE_COMMIT_OID HEAD_COMMIT_OID --
The first command identifies the two commits; the second summarizes the difference between their committed trees. Your uncommitted files are outside this comparison. Use the recorded IDs when checking an older review: branch names may now point to newer commits.
Read the diff in context
The changed-file tree opens read-only inline diffs. Files from the comparison can be open next to your current files, so check which version each tab shows before you reason about a caller or test. Your working tree may already contain changes that aren’t in the selected head.
For each change that affects behavior, read past the edited lines:
- Find a caller that can reach the new code.
- Work out what input or state makes it run.
- Follow the return value, error, or side effect back to the caller.
- Check whether an existing test actually gets into that state.
A test called “handles concurrent reads” might just make two calls one after the other. Read its setup and assertions, not its name. The promise cache review shows what that looks like in practice.
Ask the AI Reader to review
Use the comparison header’s Ask AI to review this comparison button. It prepares a draft with the selected comparison attached; it doesn’t send the request yet. Check the comparison chip, adjust the draft to say what you want reviewed, and send it when ready. If you haven’t connected a model, follow Connect a model provider first.
For example:
Review this change for cancellation and error-handling regressions. For each finding, give the changed location, the state that triggers it, what the user would see, and the code that supports it. List issues that already existed in the base separately.
Check that each trigger it suggests can really happen in the selected commits. If reading the code leaves the order unclear, ask for a reproduction or a focused test, then run it yourself. A test in an answer hasn’t been run.
When you want to fix something
Git comparison conversations are always read-only. To make the fix, start a normal conversation on your current working tree and turn on Allow Edits. Keep the comparison around for reference.
Afterwards, read the working-tree diff and run the project’s checks yourself. Stopping a run doesn’t revert files that were already written. If the working tree had other changes before, separate them from the fix before you decide what to commit.