Skip to main content

Usage

Description

Display the commit history for a branch. Shows commit IDs, authors, dates, and messages.

Arguments

branch
string
Branch to show commits for. Defaults to current branch.You can also use branch1..branch2 syntax to show commits in branch2 that aren’t in branch1.

Options

-n, --number
number
Limit number of commits to show. Defaults to 10.
--oneline
boolean
Show commits in single-line format for a compact view.

Examples

Show Recent Commits

Output:

Show Commits in Compact Format

Output:

Show More Commits

Shows the last 25 commits instead of the default 10.

Show Commits for Specific Branch

Show Commits Between Branches

Shows commits in feature/api that are not in main.

Output Format

Default Format

Oneline Format

Workflow Examples

Review Before Merge

Check Recent Activity

Error Messages

No Commits Found

Solution: The branch exists but has no commits yet.

Branch Not Found

Solution: Check the branch name with vibe branch.