Skip to main content

Overview

Before merging branches, you’ll want to understand what’s different between them. VibeHub’s branch comparison shows you exactly how branches have diverged.

Accessing Branch Comparison

1

Open Project Settings

Navigate to your project and click the Settings tab
2

Find Branch Management

Scroll to the branch management section
3

Select Branches to Compare

Choose the source and target branches from the dropdowns

Understanding the Comparison

Ahead and Behind

The comparison shows two key metrics:
MetricMeaning
AheadCommits in source branch that aren’t in target
BehindCommits in target branch that aren’t in source

Status Messages

Based on the comparison, you’ll see one of these status messages:
Both branches have the same commits. No merge needed.
The source branch has commits that the target doesn’t have. You can merge these changes into the target.
The target branch has commits that the source doesn’t have. You may want to update your source branch first.
Both branches have unique commits. A merge commit will be needed to combine them.

Visual Indicators

The comparison UI uses visual cues to help you understand the state:
  • Green arrow up - Commits ahead (source has changes to merge)
  • Red arrow down - Commits behind (target has changes you don’t)
  • Branch icons - Show which branch is which

Common Scenarios

Simple Feature Branch

main:     A---B---C
               \
feature:        D---E
Result: Feature is 2 commits ahead, 0 behind. Fast-forward merge possible.

Updated Main Branch

main:     A---B---C---F
               \
feature:        D---E
Result: Feature is 2 ahead, 1 behind. Branches have diverged.

Identical Branches

main:     A---B---C
feature:  A---B---C
Result: Branches are identical. Nothing to merge.

Using Comparison for Code Review

Branch comparison is useful for:
  1. Pre-merge review - See all changes before merging
  2. Understanding scope - Know how much has changed
  3. Identifying conflicts - Diverged branches may have conflicts
  4. Planning merges - Decide if you should update your branch first

From Comparison to Merge

If the comparison shows your source branch is ahead, you’ll see a Merge button:
  1. Review the commit count
  2. Click Merge when ready
  3. See Merging for details on the merge process
Always compare branches before merging to avoid surprises. If branches have diverged significantly, consider updating your feature branch first.

Next Steps