git-ai-project/git-ai

A Git extension for tracking the AI-generated code in your repos

What it solves

Git AI is a git extension that tracks exactly which lines of code in a repository were generated by AI. It prevents the loss of intent, requirements, and architectural decisions by linking every AI-generated line to the specific agent, model, and prompt that created it.

How it works

Coding agents call a checkpoint command when writing code. Upon commit, Git AI stores line-level attribution data in Git Notes. The system automatically manages agent hooks and ensures attribution is preserved during common Git operations like rebasing, squashing, and merging by analyzing the final state of the code and updating the notes.

Who it’s for

Developers and engineering teams who use AI coding agents (such as Claude Code, Cursor, or GitHub Copilot) and want to maintain a clear audit trail of AI-contributed code for code review, durability analysis, and incident tracking.

Highlights

  • AI Blame: A drop-in replacement for git blame that shows AI attribution per line.
  • Attribution Stats: Provides aggregate statistics on AI-code acceptance rates and human overrides.
  • Workflow Integration: Requires no changes to existing git workflows, no git hooks, and works locally by default.
  • Broad Agent Support: Compatible with a wide range of agents including Claude Code, Cursor, Windsurf, and Gemini.
  • Secure Storage: Prompts are scanned, redacted, and saved outside of the Git repository to prevent PII or secret leaks.

Related

  • Project
  • Project
  • Project
  • Project