How to Remove Co-Authored-By Traces from Claude Code Commits
One setting change is all it takes to keep your commit history clean.
Introduction
When you ask Claude Code to commit, it appends this to the end of every commit message:
Co-Authored-By: Claude <[email protected]>
Honestly, I don't like it.
Sure, I asked Claude to do it. But having this stamped on every single commit is a different story. I want a clean commit log, and seeing an AI tagged as co-author on every commit is just noisy.
There's an even bigger problem. Click on the Claude account profile linked in Co-Authored-By on GitHub โ you get a "Something went wrong" page. A ghost account that doesn't actually exist is tagged as co-author on every commit in your history. Anyone who clicks the Claude avatar in your commit list gets an error page. Not a great look.
One setting change fixes this.
Official Settings
According to the Claude Code official documentation, there are two settings that control this behavior:
| Setting | Description | Default |
|---|---|---|
attribution | Customizes attribution for git commits and pull requests | {"commit": "๐ค Generated with Claude Code", "pr": ""} |
includeCoAuthoredBy | Deprecated: use attribution instead. Whether to include co-authored-by Claude byline in git commits and pull requests | true |
includeCoAuthoredBy is deprecated, and attribution is the recommended approach. Both still work.
Method 1: attribution Setting (Recommended)
Add the following to your ~/.claude/settings.json:
{
"attribution": {
"commit": "",
"pr": ""
}
}commit: Controls the trailer appended to commit messages. Defaults to"๐ค Generated with Claude Code". Set to an empty string ("") to remove it entirely.pr: Controls the text appended to PR descriptions. Already defaults to an empty string, but it's cleaner to be explicit.
If you want a custom message instead of removing it entirely, just put your preferred text in place of the empty string. For example, "commit": "Assisted by AI".
Method 2: includeCoAuthoredBy Setting (Deprecated)
Simpler but deprecated. Add this one line to ~/.claude/settings.json:
{
"includeCoAuthoredBy": false
}The attribution setting takes precedence over includeCoAuthoredBy. If you're setting this up fresh, use attribution.
Where to Put It?
These settings can go in your global config (~/.claude/settings.json) to apply to all projects, or in your project config (.claude/settings.json) for per-project control.
| File Location | Scope | Git Shared |
|---|---|---|
~/.claude/settings.json | All projects (global) | No |
.claude/settings.json | Current project | Yes (team sharing) |
.claude/settings.local.json | Current project (personal) | No |
If you want it gone everywhere, the global setting is the way to go.
Cleaning Up Existing Commits
What about commits that already have it? You can fix them with git rebase, but it's not recommended on shared branches. It'll mess up the history.
If you want to edit a few recent commits on a personal branch, git rebase -i lets you modify commit messages. But if those commits are already pushed, you'll need a force push โ proceed with caution.
Realistically, just keep future commits clean.
Wrap Up
Here's the summary:
- Add
attributionwith empty strings to~/.claude/settings.jsonโ done. includeCoAuthoredByis deprecated, so useattribution.- Don't bother cleaning up old commits. Just keep things clean going forward.
One setting change and the AI traces disappear from your commit history. No more "Something went wrong" error pages when someone clicks on the ghost co-author.