Skip to main content

uncredit

Formerly git-deai.

The deai command remains for one release and prints deai is now uncredit before running.

PyPI Tests License: MIT

uncredit scan finds two commits with AI credits, uncredit clean rewrites them after a y/N prompt, and git log shows the human co-author kept

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 <noreply@anthropic.com> 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.

Before:

c72d54a docs: update README
        🤖 Generated with [Claude Code](https://claude.com/claude-code)
        Co-Authored-By: Claude <noreply@anthropic.com>
6b98cbb fix: handle empty input
        Co-authored-by: Jane Doe <jane@example.com>
049c5fb feat: add parser
        Co-Authored-By: Claude <noreply@anthropic.com>

After uncredit clean:

c70f42d docs: update README
24d6828 fix: handle empty input
        Co-authored-by: Jane Doe <jane@example.com>
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:

uncredit scan --help

Other ways to install:

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.

Usage

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.

Options

option commands what it does
-r, --recursive scan, clean find repositories below each path
--me EMAIL scan, clean another e-mail of yours (repeatable). git config user.email is always included.
--yes clean do not ask before rewriting
--push clean force-push branches and rewritten tags (--force-with-lease) afterwards
--as 'Name <email>' clean identity for commits authored by an AI (default: git config user.*)
--include-shared clean also rewrite shared repositories (rarely what you want)

What is removed

  • Co-authored-by: trailers whose name or e-mail matches an AI tool. Human co-authors stay.
  • "Generated with <AI tool>" lines, e.g. 🤖 Generated with [Claude Code](https://claude.com/claude-code).
  • AI author and committer identities, which are re-attributed to you.

Matched tools: Claude/Anthropic, GitHub Copilot, Cursor, ChatGPT/OpenAI/Codex, Gemini, Devin, Aider, Codeium/Windsurf, Tabnine, CodeWhisperer/Amazon Q, Jules, Sweep.

Safety

  • A clean worktree is required. clean refuses to run if tracked files have uncommitted changes.
  • A backup is made first. Every branch and tag is saved to .git/uncredit-backup-<time>.bundle. To restore it:
    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/<branch>).
  • 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.

Test

python tests/test_uncredit.py

License

MIT, see LICENSE.

Metadata

Release files for uncredit 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uncredit 0.3.0
File Size Uploaded Provenance Actions
uncredit-0.3.0.tar.gz 132.9 kB With provenance Details for uncredit-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for uncredit 0.3.0
File Interpreter ABI Platform Actions
uncredit-0.3.0-py3-none-any.whl Python 3 none any Details for uncredit-0.3.0-py3-none-any.whl

Total release size: 148.7 kB

Release files / uncredit-0.3.0.tar.gz

Download URL uncredit-0.3.0.tar.gz
Size 132.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a4e40ee36aaa0b0a173ebfa62489c56a7d6d101a0caa5ad7e951cfe8be7e100a
BLAKE2b-256 checksum
How to use checksums
fa6f59425f1dba5e764d259ed9510b71f6b8af243a0a7e22a7b76d19940e796a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

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 Publish Attestation

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.

Transparency log

Release files / uncredit-0.3.0-py3-none-any.whl

Download URL uncredit-0.3.0-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e5f314b904fd716d04a7b9e9b111f8d2d9d9b119f4f8b4a9b8843d2e81973eda
BLAKE2b-256 checksum
How to use checksums
c4cbe34060e889548efd4c941c3a7cfc23adbf2d9d3dc3b5e20be5812f69095a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

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 Publish Attestation

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.

Transparency log

Security for uncredit 0.3.0

Provenance

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for uncredit-0.3.0.tar.gz

PyPI Publish Attestation

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.

Transparency log

A note on package security

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.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page