What it does
Git AI is an open-source Git extension that records which lines of your code were written by AI coding agents. Each AI-written line is linked to the agent, model and prompts behind it, so the intent and requirements behind your code are not lost. Agents report what they write through a checkpoint command, and on commit the line-level attribution is stored in Git Notes. The project says it does not use AI or heuristics to guess, relying instead on agents reporting exactly which lines they wrote. It does not use Git hooks or wrap the Git binary, so Git commands keep their normal speed, and it works offline without a login. Attribution is preserved through rebase, squash, cherry-pick, stash, amend and other rewrite operations, though renames with git mv and bulk history rewrites such as filter-repo are not tracked yet. git ai blame is a drop-in replacement for git blame that shows AI attribution per line, and git ai stats reports the share of AI code, accepted rates and human overrides by tool and model. A separate Git AI for Teams product, self-hosted or cloud, adds aggregate stats across repositories, a secure prompt store and token cost by pull request. Community plugins show attribution in editors such as VS Code, Cursor, Windsurf and Emacs magit.
Capabilities
- Line-level attribution linked to the agent, model and prompt
- git ai blame as a drop-in replacement for git blame
- git ai stats for AI share, accepted rate and human overrides
- Attribution kept through rebase, squash, cherry-pick and more
- Stored in Git Notes with no Git hooks and no wrapping of Git
- Works locally and offline with no login
When to use it
- You want to see which parts of a codebase were written by AI agents
- Your team wants to measure how much AI-generated code is accepted and reworked
- You want to review code alongside the prompts that produced it
- You use several coding agents and want one consistent attribution record