Skip to content
GitTree
Branches and tags

Compare branches and tags

Compare References… compares any two branches, tags, remote branches or commits by name. It shows how many commits one is ahead of and behind the other, and the files that differ: either every difference (git diff A B) or only what the new side changed since they split (A...B, what a pull request shows).

FreeUpdated

Works in GitTree Free: every local Git feature, once you are signed in.

On this page
  1. Before you start
  2. Where to find it
  3. Steps
  4. Expected result
  5. Which comparison?
  6. If something goes wrong
  7. Questions
  8. Related

Before you start

  • A repository is open, with the branches or tags you want to compare.

Where to find it

  • The command palette: Compare References….
ActionmacOSWindows and Linux
The command palette, then Compare References…⌘⇧PCtrl+Shift+P

Steps

  1. Pick the two sides

    Run Compare References…. Type in Old side and New side: branches, tags, remote branches or a commit id (at least 4 characters) are suggested as you type.

  2. Choose what to compare

    The two endpoints shows every difference between the two trees. Changes since the merge base shows only what the new side changed since it split from the old one.

  3. Compare

    Press Compare. The bar says, for example, that the new side is 3 ahead of and 1 behind the old side, and the list shows the files that differ.

Expected result

You see how two lines of work relate and exactly which files differ; Change… picks other sides.

Which comparison?

The two ways to compare references
ChoiceUse it to
The two endpointsSee what differs between two releases, such as v2.1.0 and v2.2.0.
Changes since the merge baseReview a branch before merging it, as a pull request would show it.

If something goes wrong

“These histories share no commit, so there is no merge base.”

The two sides are unrelated. GitTree shows the two endpoints instead.

“This repository is a shallow clone: the counts may be incomplete.”

Fetch more history for exact numbers (fetch, pull and push).

Questions

Can I compare a branch with my uncommitted work?

Yes: right-click the branch’s commit and choose Compare with Working Directory.