ClaudeHack
0.000

Blank the attribution setting to keep Claude out of your commit trailers

Git & GitHub / Pull Requests·14 hours ago·verified 14 hours ago·easy·~1 min setup·verified

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
  }
}

Additional details

You can also replace rather than remove. Any string works, so a team that wants attribution in its own format can set one: ```json { "attribution": { "commit": "Generated with AI\n\nCo-Authored-By: AI <ai@example.com>", "pr": "" } } ``` `attribution` takes precedence over the deprecated `includeCoAuthoredBy` setting, so if you set that previously, this replaces it.

Source

youtube·View original →·by Simon Scrapes

Does this still work?

0 said it works · 0 said it's broken

Related

Discussion

No comments yet. Be the first to say whether this worked for you.