How to review AI code changes with Git before you commit

Check what Claude Code or Codex changed before it lands: git diff, staging hunks, checkpoints, and a Git panel next to your AI sessions.

Updated View as Markdown

An agent can touch a dozen files in one turn. Before you commit, you want to know what changed, keep what's good, and drop what isn't. Git already gives you everything for that. The question is how quickly you can get to it when you are running more than one session.

The plain Git way

In the repository the agent worked in:

git status            # which files changed
git diff              # unstaged changes, line by line
git add -p            # stage hunk by hunk, skip the rest
git diff --staged     # what will be committed
git commit -m "…"

git add -p (docs) is the most useful one here: it walks you through every hunk so nothing slips in unread. Your editor's source control view does the same with a mouse.

A habit that helps: commit (or at least stage) your own work before you start an agent, so its changes stand alone in the diff.

Undo inside Claude Code

Claude Code also keeps checkpoints. Anthropic's docs say you can use /rewind, or press Escape twice, to restore the conversation and code to a previous checkpoint (costs guide). That's handy right after a bad turn; Git is still where you decide what to keep.

A Git panel next to your sessions

Void Island has a built-in Git plugin. It lists the repositories your AI sessions are working in, so you can review and commit without finding the right terminal first.

Open it

Click the branch icon in the island's tab bar, or open Settings → Git repositories and click Open.

What you can do

  • See which repos changed. The folder each AI session is working in, plus up to 8 recent ones. Each shows its number of changed files and a dot for "session running" or "finished", so you know when it's safe to look.
  • Read the diff. Staged and unstaged files, as a list or a tree, with a read-only diff for each.
  • Stage and unstage. Click a file, or select several.
  • Commit. Type a message and press ⌘↩. It runs git commit -m in that repo.
  • Discard carefully. Discarding asks first and keeps a backup in ~/Library/Application Support/Void Calendar/Git Recovery/.
  • Tidy up. Add a file to .gitignore; save, apply, pop, drop or rename stashes; switch, detach or create branches.
  • See the history. A commit graph of the last 50 commits across branches, remotes and tags, collapsed by default.

AI commit messages (optional)

The sparkle button writes a commit message for you using the Voido assistant. It needs Voido connected, and it sends the diff to Voido's assistant. Nothing is sent unless you click it.

See Git for details.

Limits

  • No push or pull. Void Island commits locally; push from your terminal or editor.
  • Diffs are read-only. Edit the code in your editor.
  • Staging is per file, not per hunk. For hunk-level control, use git add -p or your editor.
  • AI commit messages need Voido.

Common questions

Is the Git panel included in free mode?

The Git plugin isn't in the list of features that need a license. Free mode limits multiple sessions, approvals, questions, jumping back and action shortcuts. See License.

Which repositories show up?

The repository each AI session is working in (found with git rev-parse --show-toplevel), plus up to 8 you used recently.

Can I get back changes I discarded from the island?

Yes. Discards are backed up to the Git Recovery folder before they happen.

Can I turn the Git plugin off?

Yes. Each built-in plugin (AI sessions, Git, keep awake) can be switched off in Settings, as long as one stays on.