Blank the attribution setting to keep Claude out of your commit trailers
Claude Code adds a Co-Authored-By trailer to commits and an attribution line to pull requests. Set both to empty strings and it stops.
The problem
Every commit Claude touches carries a generated-with trailer, which pollutes git blame, breaks commit-message linters, and is awkward in repos with contribution policies about AI attribution.
The hack
Add an `attribution` object to `settings.json` with `commit` and `pr` set to empty strings. Empty string hides that attribution entirely.
Why it works
Attribution is a formatting choice, not a policy you have to accept. Configuring it once at the user level means you never have to remember to strip trailers by hand or rewrite history afterwards.
Setup
1. Open `~/.claude/settings.json`. 2. Add an `attribution` object with `commit` and `pr` set to `""`. 3. Set `sessionUrl` to `false` as well if you do not want the claude.ai session link appended as a `Claude-Session` trailer. 4. Make a commit through Claude Code and confirm the trailer is gone. 5. Set it in project settings instead if this is a team convention rather than a personal one.
Code
{
"attribution": {
"commit": "",
"pr": "",
"sessionUrl": false
}
}
Discussion
No comments yet. Be the first to say whether this worked for you.