[BUG] Commit messages polluted by `Generated with [Claude Code](https://claude.ai/code)` entries
Status Fixed / completed
Maintainer reply ✓ Yes — bcherny
Activity 14 comments · opened May 24, 2025 · closed Jul 26, 2025
💡 Likely answer: A maintainer (bcherny, collaborator)
responded on this thread — see the highlighted reply below.
Despite clear rules in CLAUDE.md to not do that, I still need to combat Claude spamming my commit messages with
│ 🤖 Generated with [Claude Code](https://claude.ai/code) │
│ │
│ Co-Authored-By: Claude <noreply@anthropic.com>" │
Can you please stop or at least add option to opt-out?
14 Comments
https://docs.anthropic.com/en/docs/claude-code/settings#available-settings
Key | Description | Example
-- | -- | --
apiKeyHelper | Custom script to generate an Anthropic API key | /bin/generate_temp_api_key.sh
cleanupPeriodDays | How long to locally retain chat transcripts (default: 30 days) | 20
env | Environment variables that will be applied to every session | {"FOO": "bar"}
includeCoAuthoredBy | Whether to include the co-authored-by Claude byline in git commits and pull requests (default: true) | false
At least try reading the docs folks
@dragonfax OK sorry to hear that, the documentation is always changing but this... was a feature.
Looks like the opt out includeCoAuthoredBy is broken - would be nice if it was either fixed, or if the documentation was fixed so people don't waste time trying something that doesn't work.
I manually added
"includeCoAuthoredBy": falseto~/.claude/settings.local.jsonand I believe it worked.I guess the CLI hasn't caught up, but it did work for me in ~/.claude/settings.json as well. So go for it.
I didn't really mind the "Co-Authored-By: Claude <noreply@anthropic.com>" but it's causing the GitHub UI to tag some random guy (who has presumably claimed that's his email address?) in my commits which is annoying. So I've disabled it now, thanks to the comments here
<img width="595" alt="Image" src="https://github.com/user-attachments/assets/c15a63b0-745f-4877-84b9-07006a1a9ff4" />
Same issue, same user. I'm sure this will be fixed by Anthropic or Github, but cost me 2 hrs reviewing all the security settings, collaborators, keys, etc. Just heads up for others out there: In addition to the setting described by others, good idea to setup GPG key, so future commits will be verified. Then unverified or partially verified commits will stand out visually.
test
Not working on
1.0.43I had the ignore flag in the project settings.local.json - claude delete it, along with my ENV vars.... I swear it's one step forward 2 steps back sometimes...
Based on similar closed issues (#617, #4204), here's the solution:
Solution
Manually add the
includeCoAuthoredBysetting to your settings file:~/.claude/settings.json (global) or .claude/settings.json (project-specific):
Note: The
claude config setcommand doesn't support this setting - manual editing is required.This disables both the "🤖 Generated with [Claude Code]" line and "Co-Authored-By" attribution.
See settings documentation for more details.
🤖 Generated with Claude Code
FYI: Here's a complete summary of commands to fully clean up commits with Co-Authored-By attributions:
Complete Cleanup Commands
1. Create backup branch (safety first)
git branch backup-before-removing-attributions
2. Remove attributions from commit messages
3. Clean up filter-branch backup refs
4. Delete backup branch (optional - only after verifying success)
5. Expire reflog immediately (optional - for complete removal)
6. Aggressive garbage collection (optional - removes old objects)
7. Force push to remote (updates remote history)
Notes:
--force-with-leaseis safer than--forceas it prevents overwriting others' workThis issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.