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:| Metric | Meaning |
|---|---|
| Ahead | Commits in source branch that aren’t in target |
| Behind | Commits in target branch that aren’t in source |
Status Messages
Based on the comparison, you’ll see one of these status messages:Branches are identical
Branches are identical
Both branches have the same commits. No merge needed.
X commits ahead
X commits ahead
The source branch has commits that the target doesn’t have. You can merge these changes into the target.
X commits behind
X commits behind
The target branch has commits that the source doesn’t have. You may want to update your source branch first.
Branches have diverged
Branches have diverged
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
Updated Main Branch
Identical Branches
Using Comparison for Code Review
Branch comparison is useful for:- Pre-merge review - See all changes before merging
- Understanding scope - Know how much has changed
- Identifying conflicts - Diverged branches may have conflicts
- 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:- Review the commit count
- Click Merge when ready
- See Merging for details on the merge process