Track AI code from prompt to production
A git extension that tracks AI code through the entire SDLC.
Just prompt and commit
Install the open-source Git extension and work as usual. Every line of AI code is tracked through the entire SDLC — zero overhead, no workflow changes, no git hooks.
AI Blame
Git AI links each line of AI code to the agent, model, and prompt that generated it. Attribution survives rebases, merges, stash/pops, squashes, resets, and cherry-picks.
Git AI is the open standard for tracking AI-code with Git
Record the agent, model and session behind every line of AI-code.
Zero overhead on your git commands
Git AI runs outside the hot path. Every commit, rebase, and push is exactly as fast as before.
Install once, works in every repo
No git hooks, no per-repo config. Install it on your machine and every repository is tracked automatically.
- When agents use write toolsPatch, multiedit, edit & write — attributed line by line
- When agents use bash to write codeResulting file changes are attributed too
- Across Git worktreesMaintained across every linked worktree
- Track multiple sessions in the same commitRecords which lines belong to which session
- git rebaseCommits reordered and replayed
- git squashMultiple commits collapsed into one
- git resetCommits unwound to the working tree
- git cherry-pickCommits replayed onto another branch
- git stashChanges shelved and restored
- FormattersRe-formatting keeps every line attribution intact
Every line traces back to its source
Git AI links each line to the agent session and the exact tool call that generated it.
Cost behind every commit and PR
Git AI tracks the token usage and cost behind every commit and pull request.
How it works
A hook checkpoints each tool call as agents work; Git AI attaches the record on commit and keeps it accurate through every git operation.
A checkpoint fires on every tool call
Git AI registers a post-tool-call hook with every supported agent. After each Edit, Write, or Bash tool call, the hook runs git ai checkpoint to mark the lines just written — no setup, no workflow changes.
Git AI attaches a note on every commit
When you commit, Git AI consolidates those checkpoints into a Git note attached to the commit. Your history and commit messages stay clean — the attribution rides alongside in refs/notes/ai.
Attribution survives every git operation
Git AI understands each git operation and updates the attribution to match. However you rewrite history, every line stays tied to the agent, model, and session that wrote it.