> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vibehub.co.in/llms.txt
> Use this file to discover all available pages before exploring further.

# vibe log

> Show commit history for a branch

## Usage

```bash theme={null}
vibe log [branch] [options]
```

## Description

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

## Arguments

<ParamField query="branch" type="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.
</ParamField>

## Options

<ParamField query="-n, --number" type="number">
  Limit number of commits to show. Defaults to 10.
</ParamField>

<ParamField query="--oneline" type="boolean">
  Show commits in single-line format for a compact view.
</ParamField>

## Examples

### Show Recent Commits

```bash theme={null}
vibe log
```

Output:

```
Commits on 'main':

commit abc1234567890
Author: John Doe
Date:   1/25/2026, 2:30:45 PM

    Add user authentication feature

commit def4567890123
Author: Jane Smith
Date:   1/24/2026, 4:15:30 PM

    Update API endpoints
```

### Show Commits in Compact Format

```bash theme={null}
vibe log --oneline
```

Output:

```
Commits on 'main':

abc1234 Add user authentication feature
def4567 Update API endpoints
ghi8901 Fix database connection
jkl2345 Initial commit
```

### Show More Commits

```bash theme={null}
vibe log -n 25
```

Shows the last 25 commits instead of the default 10.

### Show Commits for Specific Branch

```bash theme={null}
vibe log feature/payments
```

### Show Commits Between Branches

```bash theme={null}
vibe log main..feature/api
```

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

## Output Format

### Default Format

```
commit <commit-id>
Author: <author-name>
Date:   <date-time>

    <commit-message>
```

### Oneline Format

```
<short-id> <commit-message>
```

## Workflow Examples

### Review Before Merge

```bash theme={null}
# See what commits will be merged
vibe log main..feature/auth

# If happy, merge
vibe checkout main
vibe merge feature/auth
```

### Check Recent Activity

```bash theme={null}
# What happened today?
vibe log -n 5 --oneline
```

## Error Messages

### No Commits Found

```
No commits found for branch 'feature'
```

**Solution:** The branch exists but has no commits yet.

### Branch Not Found

```
Branch 'feature' not found
```

**Solution:** Check the branch name with `vibe branch`.

## Related Commands

* [vibe branch](/cli/commands/branch) - List branches
* [vibe diff](/cli/commands/diff) - Compare branches
* [vibe status](/cli/commands/status) - Check current status
