Find and remove AI co-author credits from git history
The deai command remains for one release and prints deai is now uncredit before running.
Remove AI co-author credits from your git history. Human co-authors and file contents stay as they are.
AI coding tools append Co-Authored-By: Claude and similar lines to commit messages. GitHub reads them and lists the tool under your repository's Contributors. uncredit finds these credits across your repositories, backs up, and rewrites the messages. Nothing is pushed unless you ask.
c72d54a docs: update README 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude 6b98cbb fix: handle empty input Co-authored-by: Jane Doe 049c5fb feat: add parser Co-Authored-By: Claude After uncredit clean:
c70f42d docs: update README 24d6828 fix: handle empty input Co-authored-by: Jane Doe 0223c1d feat: add parser Try it on your own repositories. scan only reads:
$ uvx --from uncredit uncredit scan -r ~/code AI credits ~/code/my-app (3 commits; trailers 2, AI author/committer 0) trailer: c72d54a 049c5fb Install One line, nothing needed beforehand: the script installs uv if it is missing, and uv fetches a Python. Windows (cmd or PowerShell):
powershell -ExecutionPolicy Bypass -c "irm -useb https://raw.githubusercontent.com/NaNIsaac/uncredit/main/install.ps1 | iex" macOS and Linux:
curl -LsSf https://raw.githubusercontent.com/NaNIsaac/uncredit/main/install.sh | sh It runs uv tool install uncredit and puts uv's command folder on PATH for new terminals. Run the same line again to update.
uncredit needs git. By hand, it needs Python 3.10+ too; with uv: Termux is tested in CI.
uv tool install uncredit Check that the command works:
pip install uncredit pipx install uncredit # from a local clone uv tool install -e . The package is uncredit; the command it installs is uncredit. To try it without installing: uvx --from uncredit uncredit --help.
uncredit scan https://github.com/example/project and uncredit scan example/project scan a disposable bare partial clone without checking out files. Private repositories use your existing git credentials. Clone failures report authentication or URL problems; no token or login file is read by uncredit.
uncredit scan --github example lists repositories through your authenticated gh CLI and shows progress as each is scanned. Forks and archived repositories are skipped unless --include-forks or --include-archived is given. Temporary clones are removed on success, failure and Ctrl-C. clean accepts local repositories only: a remote URL or owner/repo prints the exact clone, local clean and leased-push commands without running them.
1. Scan (read-only). Scanning only reports; it changes nothing.
uncredit scan # the repository in the current directory uncredit scan path/to/repo # one repository uncredit scan -r ~/code # every repository under a folder AI credits /home/me/code/my-app (96 commits; trailers 51, AI author/committer 0) trailer: faea929 e37c10a 2ce9a9c 7a5f1ab ... clean /home/me/code/notes (8 commits; trailers 0, AI author/committer 0) shared /home/me/code/xarray (6578 commits; trailers 96, AI author/committer 1) by others: Deepak Cherian , ... mark meaning clean nothing to do AI credits your commits carry AI credits; clean will fix them shared someone else's commits carry AI credits (a fork or shared history); skipped by default 2. Clean (rewrites history).
uncredit clean path/to/repo # shows the scan, asks y/N, backs up, rewrites uncredit clean -r ~/code # every repository found (shared ones skipped) uncredit clean -r ~/code --yes --push # no question; force-push afterwards 3. Publish. Without --push, nothing leaves your machine. When you are happy with the result, run the same command again with --push; scan marks such repositories unpushed until then. Do not use git push --all: it would also push stale local branches over newer remote ones. Do not git pull a cleaned branch either: it merges the old history, AI credits included, back in.
GitHub can take a while to refresh the Contributors list after the push.
Matched tools: Claude/Anthropic, GitHub Copilot, Cursor, ChatGPT/OpenAI/Codex, Gemini, Devin, Aider, Codeium/Windsurf, Tabnine, CodeWhisperer/Amazon Q, Jules, Sweep.
git fetch --force .git/uncredit-backup-20261014-222005.bundle 'refs/*:refs/*' Pushes never lose remote commits. --push fetches first. A local branch that is behind its remote is fast-forwarded before the rewrite. A branch that has diverged from its remote is compared commit by commit (git cherry, which matches a rewritten commit to its original). If the remote has nothing the branch lacks, the branch is pushed. If the branch has nothing the remote lacks (the remote was cleaned from another machine), the branch is moved to the remote's history. If both sides have new work, uncredit stops and tells you to git rebase onto the remote. Each branch is force-pushed with an explicit lease on the commit seen at fetch time. Only branches with an upstream are pushed; local-only branches stay local. Only remote tags that the rewrite cleaned are pushed, each with a lease on the tag seen at fetch time. Other remote tags and local-only tags are left alone. Forks are protected. A repository whose flagged commits were written by other people is marked shared and skipped. Rewriting it would split your fork from upstream. Things to know Commit hashes change from the first cleaned commit onward. Anyone else with a clone must re-clone (or git fetch && git reset --hard origin/ ). Open pull requests from a rewritten branch need to be re-created. GPG-signed commits lose their signatures, because the signed content changed. So do signed annotated tags that point into the rewritten history. Protected branches on GitHub may reject the force-push. Allow force-pushes temporarily, or push to a new branch. Stop it from coming back Turn the attribution off in your AI tool. In Claude Code, add this to ~/.claude/settings.json (an empty string removes that line):
{ "attribution": { "commit": "", "pr": "" } } How it works git fast-export --branches --tags → message filter (stdlib Python) → git fast-import --force. File contents are passed through untouched, so every tree is byte-identical to the original.
python tests/test_uncredit.py License MIT, see LICENSE.
All 2 files in this release have provenance metadata.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
All 2 files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




