unclaude.py A developer released unclaude.py, an open-source Git hook that automatically removes Anthropic's Co-Authored-By lines from commit messages generated by Claude Code. The script, available under the Unlicense, can be installed as a commit-msg hook or used to rewrite recent commits, with backup and restore functionality. | /usr/bin/env python3 | | | SPDX-License-Identifier: Unlicense | | | | | | Adds an impressive feature from VSCode and Vim to Claude Code: | | | the ability to edit code without signing the guest book in every commit. | | | | | | Usage: | | | Install as a repository-local commit-msg hook: | | | curl -fsSL https://gist.githubusercontent.com/Garfield1002/1a3fe1f601f5c36257a1c98b414f7141/raw/unclaude.py | install -m 0755 /dev/stdin .git/hooks/commit-msg | | | | | | Rewrite the most recent commit message: | | | unclaude.py --fix-previous | | | | | | Rewrite the last N commits on HEAD's first-parent history: | | | unclaude.py --fix-previous 5 | | | | | | When installed directly as a hook, invoke it like this: | | | .git/hooks/commit-msg --fix-previous 5 | | | | | | Warning: | | | --fix-previous rewrites Git history. Rewritten commits receive new object | | | IDs, and affected commit signatures are removed because they are no longer | | | valid. Do not rewrite published commits without coordinating a force-push. | | | | | | The script creates a backup under: | | | refs/strip-anthropic-backup/ | | | | | | A backup can be restored with: | | | git reset --keep refs/strip-anthropic-backup/