Git AI

Get Started with Git AI

Git AI is an open source git extension that tracks AI-generated code in your repositories, linking every AI-written line to the agent, model, and prompts that generated it.

Install the Extension

Mac, Linux, Windows (WSL)

curl -sSL https://usegitai.com/install.sh | bash

Windows (non-WSL)

powershell -NoProfile -ExecutionPolicy Bypass -Command "irm http://usegitai.com/install.ps1 | iex"

🎊 That's it! No per-repo setup.

You don't have to change your workflow. You don't have your agents make the commits.

Once the extension is installed, Git AI will track the AI-code entering your repositories as you work.


Post-Commit AI-attributions

Cross-Agent AI Blame

How it works

  1. Agents call git-ai checkpoint as they code — marking the code they generate explicitly without requiring workflow changes. Implemented as a mix of hooks, 1p integrations and plugins.
  2. AI Attribution tracked in Git Notes — When you commit, all checkpoints are condensed into an Authorship Log and attached to the commit as a git note.
  3. Attribution survives rebases, merges, cherry-picks & more — Git AI automatically rewrites Authorship Logs after history-rewriting operations, so AI attribution is never lost.
AI Blame
1
pub fn post_clone_hook(
2
parsed_args: &ParsedGitInvocation,
3
exit_status: std::process::ExitStatus,
4
) -> Option<()> {
5
6
if !exit_status.success() {
7
return None;
8
}
9
10
let target_dir =
11
extract_clone_target_directory(&parsed_args.command_args)?;
12
13
let repository =
14
find_repository_in_path(&target_dir).ok()?;
15
16
print!("Fetching authorship notes from origin");
17
18
match fetch_authorship_notes(&repository, "origin") {
19
Ok(()) => {
20
debug_log("successfully fetched authorship notes from origin");
21
print!(", done.\n");
22
}
23
Err(e) => {
24
debug_log(&format!("authorship fetch from origin failed: {}", e));
25
print!(", failed.\n");
26
}
27
}
28
29
Some(())
30
}
Git Note (refs/notes/ai #<commitsha>)
hooks/post_clone_hook.rs
  promptid1 6-8
  promptid2 16,21,25
---
{
"prompts": {
  "promptid1": {
    "agent_id": {
      "tool": "copilot",
      "model": "Codex 5.2"
    },
    "human_author": "Alice Person",
    "summary": "Reported on GitHub #821: Git AI tries fetching authorship notes for interrupted (CTRL-C) clones. Fix: gaurd note fetching on successful clone.",
    ...
  },
  "promptid2": {
    "agent_id": {
      "tool": "cursor",
      "model": "Sonnet 4.5"
    },
    "human_author": "Jeff Coder",
    "summary": "Match the style of Git Clone's output to report success or failure of the notes fetch operation.",
    ...
  }
}
}

Git AI maintains the open standard for tracking AI authorship in Git Notes. Learn more on GitHub

Video Demo

Read a more technical deep-dive →

Our Choices

  • No workflow changes — Just prompt and commit. Git AI tracks AI code accurately without cluttering your git history.
  • "Detecting" AI code is an anti-pattern — Git AI does not guess whether a hunk is AI-generated. Supported agents report exactly which lines they wrote, giving you the most accurate attribution possible.
  • Local-first — Works 100% offline, no login required.
  • Git native and open standard — Git AI uses an open standard for tracking AI-generated code with Git Notes.
  • Agent sessions stay out of Git — Git Notes link to agent sessions stored locally, in the Git AI Cloud, or in a self-hosted prompt store — keeping your repos lean, free of sensitive information, and giving you control over your data.

Supported Coding Agents

Git AI works with all the popular coding agents. Click on any agent below to learn how Git AI integrates with it.

Troubleshooting: If you're not seeing any AI-attributions when you commit, or when you run git-ai blame, visit the guide for the Coding Agent you're trying to use for troubleshooting instructions.

Don't see your favorite Coding Agent? Add support for it by following this guide.