# Working with Git

Streamlined git workflow with visual commit proposals and real-time status updates.

Git Integration

* **Interactive Claude-generated git commit proposals**
* **Manual git commits** - Commit files edited in an AI Session
* **Git file status colors for AI Sessions** - Visual indicators for added/modified/deleted files
* **Detect more Claude changes** - Including rm, mv, echo >>, etc
* **Uncommitted files count on sessions** - See at a glance which sessions have pending changes

<figure><img src="/files/lqcHWfW1VCkqo7ORUs4W" alt=""><figcaption></figcaption></figure>

**How to use:**

* When committing, use the interactive file picker to select exactly which files to include.
* View full commit details in the expanded git widget.
* File status colors (green for added, yellow for modified, red for deleted) help you understand changes at a glance.
* Pending file reviews are auto-approved when you commit, streamlining your workflow.

**Benefits:**

* No more polling for git status - updates appear instantly
* Visual clarity on what's changed
* Faster commit workflow with fewer clicks

### Files Sidebar in Agents Mode

* A compact file list at the top showing referenced files
* A pending review banner at the bottom when files need review

<figure><img src="/files/bcADWjGONYPlpytorJAu" alt=""><figcaption></figcaption></figure>

### File Categories

Files are organized into three collapsible sections:

#### Edited

Files the AI has modified. These show:

* **Operation icon**: What the AI did to the file
  * Green `+` = Created new file
  * Blue pencil = Edited existing file
  * Red trash = Deleted file
  * Orange rename = Renamed file
* **Git status badge**: Current version control state
* **Line counts**: `+5` (lines added) `-3` (lines removed)
* **Pending review indicator**: Yellow highlight with review icon if awaiting your approval

#### Referenced

Files you mentioned in your prompts using `@filename` syntax. These are files you brought to the AI's attention but weren't necessarily modified.

#### Read

Files the AI read to understand your codebase. These provide context for the AI but weren't modified.

### Git Status Badges

For edited files, small colored badges show the git status:

| Badge          | Meaning                          |
| -------------- | -------------------------------- |
| **M** (yellow) | Modified - Changes not staged    |
| **S** (green)  | Staged - Changes ready to commit |
| **?** (gray)   | Untracked - New file not in git  |
| **D** (red)    | Deleted                          |

Hover over a badge to see "Git status: modified" (or staged, etc.)

### Pending Review Files

When the AI makes changes, those files may show as "pending review":

* **Yellow background**: The file has AI changes you haven't reviewed yet
* **Review icon**: A small review icon appears next to the filename
* **Banner**: Shows count like "3 files pending review" with a "Keep All" button

#### Accepting Changes

* Click **Keep All** to accept all pending AI changes at once
* Or review files individually by clicking on them

### File Activity Tracking and Git Status in Files Mode

<figure><img src="/files/DI08kf3k1i0SSPtrHBMQ" alt=""><figcaption></figcaption></figure>

The sidebar tracks all files the AI interacts with during a session:

**Git Status** - Shown with a Git label (M for modified, ? for untracked file)

**Uncommitted Changes** - Shows only files/folders with uncommitted changes

**Files Read** - Files the AI examined to understand context in the session

**Files Written** - Files written to by AI during the session

### Diff Peek in the Commit Proposal

Each file in a commit proposal has a diff peek popover so you can see exactly what changed without leaving the widget. It uses the same diff view as the Git extension's changes panel, and the popover is resizable — the size you pick is remembered globally, so the proposal widget and the Git extension stay in sync.

The peek shows a combined HEAD-vs-working diff that includes staged, unstaged, and untracked changes uniformly.

### Diff Peek in the Git Log

In the Git extension, when you select a commit in the log, the commit detail panel lists every file touched by that commit. Click any file in that list to pin its unified diff in the same peek popover.

* Click a file to open the diff for that file at that commit
* **Up/Down** arrow keys step through files in the commit while the popover is pinned
* **Esc** closes the popover
* The popover reuses the size persisted by the changes panel and the commit proposal widget, so all three diff peeks stay in sync

### Auto-Approve Commits

Skip the manual approval step for git commit proposals.<br>

**How to use:**

1. Go to **Settings** and enable **Auto-approve commits**, or toggle it directly on any git commit proposal widget
2. When enabled, Claude's commit proposals are committed automatically without waiting for your approval


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nimbalyst.com/developer-features/working-with-git.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
