A new open-source project called Git-AI aims to solve the growing challenge of identifying AI-generated code in collaborative software development by providing line-by-line attribution tracking that survives complex git workflows.
The rise of AI coding assistants like Claude Code, Cursor, and GitHub Copilot has created a new challenge in software development: how do teams track and attribute AI-generated code contributions? A new open-source project called Git-AI aims to solve this problem by providing comprehensive tracking of AI code contributions across the entire development workflow.
The Problem: AI Code Contributions Without Attribution
With tools that can generate entire functions or even complete features with minimal human input, developers are increasingly incorporating AI-generated code into their projects. However, this creates several issues:
- Lack of transparency: Teams often can't distinguish between human-written and AI-generated code
- Quality concerns: Without attribution, it's difficult to assess the reliability of code contributions
- Policy enforcement: Projects that want to limit AI contributions have no way to verify compliance
- Knowledge transfer: When AI-generated code needs maintenance, developers may not understand the original intent
Some open-source projects like Zig, tldr, and Ghostty have responded by banning AI contributions entirely, requiring contributors to be part of a trusted group. However, this approach may be too restrictive for many projects where AI assistance could be valuable in certain contexts.
Git-AI: A Git-Native Solution
Git-AI takes a different approach by building directly on top of git's existing infrastructure. The project works by storing AI contribution metadata in git notes—essentially blobs attached to commit references. This design choice ensures that the attribution data travels with the code through all git operations.
The tool captures several key pieces of information:
- Per-line AI contributions
- The specific model used (Claude, GPT, etc.)
- The original prompt given to generate the code
- Attribution that survives complex git operations like merge --squash, rebase, reset, and cherry-pick
Built with Rust for performance, Git-AI claims to have negligible impact even in large repositories (<100ms). The project emphasizes being "git-native" and staying out of the developer's way while providing comprehensive tracking.
Real-World Use Cases
Git-AI recognizes that AI contributions aren't always problematic. There are legitimate scenarios where AI-generated code can be appropriate:
- Non-user-facing tooling: Internal scripts, build tools, or development utilities
- Private beta features: Experimental code that may not make it to production
- Proof of concepts: Quick prototypes to validate ideas
- Isolated, low-risk changes: Simple refactors or bug fixes
In these cases, being able to see which parts of the codebase were AI-generated—even months later—could provide valuable context for maintenance and refactoring decisions.
Extending GitHub's Pull Request Interface
While Git-AI provides the core tracking functionality, the developer behind this article created a GitHub Refined plugin that extends GitHub's pull request interface to display AI contribution annotations. This plugin adds:
- Visual highlighting of AI-generated code in pull requests
- Percentage metering showing the ratio of human vs AI contributions
- Toggle functionality to turn the feature on and off
- Support for both light and dark modes

However, this plugin comes with a caveat: it relies on augmenting GitHub's HTML via CSS classes, which could change without notice and break the functionality. The developer describes it as a "beta and prototype" meant to fuel conversation about what working with AI tools might look like in the future.
The Future of AI Attribution in Development
Git-AI's approach represents a pragmatic middle ground between banning AI tools entirely and allowing unchecked AI contributions. By providing transparent attribution, teams can:
- Establish policies: Set allowable percentages of AI contributions per pull request
- Make informed decisions: Use attribution data as part of quality assessment
- Maintain trust: Build confidence in the development process through transparency
- Preserve context: Keep track of the original prompts and models used
An early access feature called "Stat Bot" is being developed to aggregate Git-AI data at the PR, developer, repository, and organization levels, potentially providing even more insights into AI usage patterns.
Getting Started
For teams interested in implementing AI attribution tracking:
- Install Git-AI and integrate it with your development workflow
- Use the VSCode extension for real-time attribution in your editor
- Consider the GitHub Refined plugin for pull request visibility
- Establish team policies around acceptable AI contribution levels
- Use the data to inform code review and quality processes
The Git-AI project represents an important step toward responsible AI integration in software development. Rather than fighting against the inevitable adoption of AI coding tools, it provides the infrastructure needed to use them transparently and effectively.
As AI continues to transform software development, tools like Git-AI may become essential for maintaining code quality, team collaboration, and project sustainability in an AI-augmented development landscape.

Comments
Please log in or register to join the discussion