Usage
Description
Compare two branches and show how they differ. Displays commits ahead/behind and the common ancestor.Arguments
Branches to compare using
.. syntax.main..feature- Compare main with feature..feature- Compare current branch with featuremain..- Compare main with current branch- (no args) - Compare current branch with default branch
Examples
Compare Two Branches
Compare Current Branch with Default
main).
Compare with Current Branch
feature/ui with your current branch.
Check if Branches are Identical
Understanding the Output
Ahead/Behind
- Ahead: Commits in branch1 that are not in branch2
- Behind: Commits in branch2 that are not in branch1
Common Ancestor
The most recent commit that both branches share. This is where the branches diverged.Workflow Examples
Before Merging
Check for Updates
Review Feature Branch
Error Messages
Same Branch
Branch Not Found
vibe branch or fetch with vibe fetch.
Related Commands
- vibe branch - List branches
- vibe merge - Merge branches
- vibe log - Show commit history
- vibe fetch - Fetch remote branches
