# Source Control and Bugbot

> Use Git in KazoCode - stage files, hunks or single lines, commit, read history and blame, resolve conflicts - and have Bugbot review your changes and pull requests for bugs.

The Source Control view (`Ctrl+Shift+G`) shows your branch, how far ahead or behind it is, and every staged, unstaged, untracked and conflicted file.

## Stage and commit

- Stage a whole file, a single hunk, or individual lines. Open a file's changes to see each hunk with stage buttons and a checkbox per line.
- Write a message and press `Ctrl+Enter` to commit.
- **Discard Changes** restores tracked files and moves untracked ones to the trash.

Changed lines are marked in the editor's gutter. Jump between them with `Alt+F3` and `Shift+Alt+F3`. Changed files are colored in the explorer too.

## History and blame

The **History** list shows recent commits; open one to see its full diff. **Git: Show File History** and **Git: Show File Blame** show who changed the current file and when.

## Merge conflicts

Conflicted files appear under **Merge Changes**. Jump between conflicts with **Go to Next Merge Conflict**, and resolve each with your version, theirs, or by editing. You can also ask the agent to resolve them.

## Bugbot

Bugbot is a reviewer agent that reads your changes and reports likely bugs, each tied to a file and line. Open it from the Source Control view to review:

- your uncommitted changes,
- your branch compared with the default branch, or
- a pull request. Findings on a pull request are posted as one GitHub review with inline comments on the changed lines (this needs the GitHub CLI, `gh`; GitLab works through `glab`).

Bugbot can run before every push (`bugbot.beforePush`), and can review your open pull requests automatically every 10 minutes (`bugbot.autoReview`).
