> ## 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.

# Commits

> View and understand your commit history

## Overview

Commits are snapshots of your project at specific points in time. VibeHub captures not just code changes, but also the AI prompts that helped create them.

## Viewing Commits

### Commits Tab

Navigate to the **Commits** tab in your project to see the full commit history. Commits are displayed in reverse chronological order (newest first).

### Commit Information

Each commit shows:

| Field             | Description                         |
| ----------------- | ----------------------------------- |
| **Message**       | The commit description              |
| **Author**        | Who made the commit                 |
| **Timestamp**     | When it was committed               |
| **Files Changed** | Number of files affected            |
| **File Preview**  | Quick preview of changed file names |

## Commit Details

Click on any commit to view its full details:

### Files Changed

See every file that was added, modified, or deleted:

| Status       | Meaning               |
| ------------ | --------------------- |
| **Added**    | New file created      |
| **Modified** | Existing file changed |
| **Deleted**  | File removed          |

### Code Diffs

View exactly what changed in each file:

* **Split View** - Side-by-side comparison of old and new code
* **Unified View** - Combined view with additions and deletions highlighted
* **Syntax Highlighting** - Code is colored based on language

<Tip>
  Use the view toggle to switch between split and unified diff modes based on your preference.
</Tip>

### AI Prompts

If prompts were captured during development, you'll see a **Prompts** panel showing:

* The prompt text
* Which AI tool was used (Cursor, Claude, etc.)
* Visual badges indicating the source

This is what makes VibeHub unique - you can see exactly what AI conversations led to the code changes.

## Commit Analysis

VibeHub can generate AI-powered analysis of your commits:

1. Open a commit
2. Click the **AI Analysis** button
3. The analysis is automatically generated

The analysis provides:

* Summary of what changed
* Explanation of the purpose
* Helpful context for reviewers

## Navigating History

### Parent Commits

Each commit (except the first) has a parent commit it builds upon. This creates a chain of history you can follow backward through time.

### Branch Context

Commits exist within branches. When viewing commits, you're seeing the history of the currently selected branch.

## Browsing Commits

On the commits tab, you can:

* **View by branch** - Use the branch selector to see commits on different branches
* **Browse chronologically** - Scroll through time-ordered commit list (newest first)

## Best Practices

### Writing Good Commit Messages

<AccordionGroup>
  <Accordion title="Be Descriptive" icon="pen">
    Write messages that explain what changed and why. Future you will thank present you.

    Good: "Fix user authentication timeout issue"
    Bad: "Fixed bug"
  </Accordion>

  <Accordion title="Use Present Tense" icon="clock">
    Write as if describing what the commit does, not what you did.

    Good: "Add password reset functionality"
    Bad: "Added password reset functionality"
  </Accordion>

  <Accordion title="Keep It Concise" icon="minimize">
    Aim for 50 characters or less for the main message. Use the description for details.
  </Accordion>
</AccordionGroup>

### Commit Frequency

* Commit often to capture progress
* Each commit should represent a logical unit of work
* Don't commit broken code to shared branches

## Next Steps

<CardGroup cols={2}>
  <Card title="Create Branches" icon="code-branch" href="/version-control/branches">
    Organize work with branches
  </Card>

  <Card title="Compare Changes" icon="code-compare" href="/version-control/comparing-branches">
    See differences between branches
  </Card>
</CardGroup>
