How to Remove “Co-Authored-By: Claude” From Claude Code Commits

How to Remove “Co-Authored-By: Claude” From Claude Code Commits

If you want Claude Code to remove co-authored-by lines from your commits, the fix is one setting. Add "attribution": false to a Claude Code settings file, and Claude stops adding the Co-Authored-By: Claude ... <[email protected]> trailer to commits and the “Generated with Claude Code” line to pull requests.

The short answer: put {"attribution": false} in ~/.claude/settings.json to turn it off in every project, or in .claude/settings.json to turn it off for one repository and your whole team. That value needs Claude Code v2.1.281 or later. If you only want to drop the commit line, or swap in your own wording, use "attribution": {"commit": ""} or "attribution": {"commit": "your text"} instead.

Settings only change new commits. Commits that already carry the trailer keep it until you rewrite them with git commit --amend or a small git rebase, which we also tested below.

Browse all our Claude Code tutorials for more fixes and how-tos.

Tested with Claude Code v2.1.332 on macOS on November 28, 2026. Every run used a throwaway demo repository called greet-app with its own Git config and a made-up author, Demo User <[email protected]>.

We made three real commits through Claude Code: one with the default settings, one with attribution turned off, and one with a custom trailer. The pull request text and the session link settings come from the official docs, since our demo had no remote.

We tested on macOS; the settings file works the same way on Windows and Linux, following Anthropic’s official instructions.

Quick Summary

What you wantSettingWhere it goesTested by us?
No Claude credit on commits or pull requests"attribution": falseAny settings file (v2.1.281+)Yes
No commit trailer, keep the PR line"attribution": {"commit": ""}Any settings fileFrom the docs
Your own trailer text"attribution": {"commit": "Assisted-by: Claude Code"}Any settings fileYes
No “Generated with Claude Code” in PRs"attribution": {"pr": ""}Any settings fileFrom the docs
No session link from cloud or Remote Control sessions"attribution": {"sessionUrl": false}Any settings fileFrom the docs
Older config that still works"includeCoAuthoredBy": falseDeprecated since v2.0.62From the docs
Clean commits you already madegit commit --amend or git rebase -xYour terminalYes (rebase)

Why Claude Code Adds “Co-Authored-By: Claude” to Commits

When you ask Claude Code to commit, it writes a normal git commit command through its Bash tool. By default, it adds a Git trailer at the end of the message that credits the model, like Co-Authored-By: Claude Sonnet 5.5 <[email protected]>.

The name in the trailer is the model in use when the commit is made. The official settings reference says a subagent’s commit names the subagent’s model, a Claude model it can’t pin to an exact version is written as plain Claude, and a non-Claude model behind a custom base URL is written as Claude Code.

Pull requests get a different line. By default, Claude Code adds 🤖 Generated with [Claude Code](https://claude.com/claude-code) to the PR description. Both lines are controlled by one setting called attribution, documented in the official settings reference.

The trailer is not a bug or a hidden tracker. It is a default credit line, and Claude Code gives you a supported switch to change it or turn it off.

Why people want it gone

Some teams don’t want tool credits in their Git history at all. Others have commit message rules, like Conventional Commits checks, that flag extra lines.

Git hosts such as GitHub also read Co-authored-by trailers to list co-authors on a commit. If you’d rather your history shows only human authors, removing the trailer is the clean way to do it.

What the Co-Authored-By Trailer Looks Like

We started Claude Code in the demo repo with no attribution settings and asked it to commit a staged file. Before running anything, Claude showed the full command in the permission prompt, trailer included.

Claude Code permission prompt for git commit -m Add greet function with a Co-Authored-By: Claude Sonnet 5.5 noreply@anthropic.com trailer inside the commit message
With default settings, Claude writes the Co-Authored-By trailer into the commit command itself

This is the easiest place to spot it. If you read the command before you approve it, you’ll see the extra line every time.

After the commit, a plain git log -1 in our own terminal showed the trailer stored in the commit message.

git log -1 output showing commit Add greet function by Demo User with the trailer Co-Authored-By: Claude Sonnet 5.5 noreply@anthropic.com
git log shows the default trailer saved at the end of the commit message

Notice the author is still the human, Demo User. The trailer adds Claude as a co-author; it doesn’t replace you as the author.

Fix 1: Turn Off All Attribution With “attribution”: false

This is the one-line fix most people are looking for. It hides the commit trailer, the pull request line and the session link together.

{
  "attribution": false
}

We saved that as .claude/settings.json in the demo repo. Our session ran Claude Code v2.1.332, which is newer than the v2.1.281 the docs list as the minimum for this value.

Terminal showing the project settings file with attribution set to false and claude --version printing 2.1.332 (Claude Code)
The whole fix: attribution set to false in the project settings file

Then we started a new Claude Code session and asked for the same kind of commit. This time the permission prompt showed a plain git commit -m "Add farewell function" with nothing extra.

Claude Code permission prompt showing git commit -m Add farewell function with no Co-Authored-By trailer
With attribution off, Claude’s commit command has no trailer at all

The saved commit confirmed it. The message is just the subject line.

git log -1 output showing commit Add farewell function by Demo User with no Co-Authored-By line
The new commit has a clean message and no Claude credit

If you’re on an older version

The docs warn that versions before v2.1.281 reject the false value and skip the whole settings file that holds it. That means your other settings in that file stop working too.

Check with claude --version and run claude update if you’re behind. If you must support older versions, use the long form instead, which the docs recommend for files that older versions also read:

{
  "attribution": {
    "commit": "",
    "pr": "",
    "sessionUrl": false
  }
}

Fix 2: Remove Only the Commit Trailer

Maybe you’re happy for pull requests to say they were made with Claude Code, but you want commits clean. Set just the commit part to an empty string.

{
  "attribution": {
    "commit": ""
  }
}

The reverse works too. Set "pr": "" to hide the PR line and keep the commit trailer. Any part you leave unset uses Claude Code’s default text.

Fix 3: Replace It With Your Own Trailer

Some teams want a credit line, just in their own words. The commit value is the exact text Claude Code adds to commits, including any trailers.

We set our demo project to use Assisted-by: Claude Code and to drop the PR line.

Project settings file with attribution commit set to Assisted-by: Claude Code and pr set to an empty string
A custom commit line and no pull request line, set in one block

In a fresh session, Claude used our text. Its command was git commit -m "Add shout helper" -m "Assisted-by: Claude Code", and the saved commit ended with our line.

git log -1 output showing commit Add shout helper with the custom trailer Assisted-by: Claude Code
Claude wrote the custom trailer from settings instead of Co-Authored-By

For more than one line, use \n inside the JSON string. The official example is "Generated with AI\n\nCo-Authored-By: AI <[email protected]>", which puts a blank line between a note and a trailer.

Fix 4: The Old includeCoAuthoredBy Setting

You’ll still see "includeCoAuthoredBy": false in older guides and dotfiles. According to the docs, it was deprecated in v2.0.62 when attribution replaced it.

Claude Code still honors includeCoAuthoredBy: false, and it hides both the commit trailer and the PR text. But once you set attribution.commit or attribution.pr, Claude Code ignores the old key.

Your settingsCommit trailerPR line
Nothing setDefault Co-Authored-ByDefault “Generated with Claude Code”
includeCoAuthoredBy: false onlyHiddenHidden
includeCoAuthoredBy: false plus attribution.commitYour commit textDefault (old key is ignored)
attribution: falseHiddenHidden

If you have the old key, switch to attribution now. It’s clearer and gives you separate control over each part.

Where to Put the Attribution Setting

Claude Code reads several settings files, and the scope you pick decides who the change affects. Our guide to settings.json locations covers every path, but here’s the short version for this key.

Diagram of Claude Code settings layers from highest to lowest: managed settings, the --settings flag, .claude/settings.local.json, .claude/settings.json and ~/.claude/settings.json
Higher layers win when more than one file sets attribution
  • ~/.claude/settings.json: your user file, for every project on your machine. Best if you never want the trailer.
  • .claude/settings.json: the shared project file. Commit it so the whole team gets the same rule.
  • .claude/settings.local.json: just you, just this project. Claude Code keeps it out of your commits.
  • --settings: a flag for one session, such as claude --settings '{"attribution": false}'.
  • Managed settings: set by your organization. You can’t override a managed value with your own files.

The general rules for these layers are in the official settings guide, and our post on settings file scopes walks through each scope with examples.

CLAUDE.md rules and managed settings

The settings reference adds one more detail. Claude Code tells Claude that your own instructions about attribution, such as a line in your CLAUDE.md file or memory, take precedence over these commit and PR lines.

The exception is managed settings. If your organization sets the attribution text in managed settings, that line stays. Ask your admin rather than fighting it with prompts.

Fix 5: Remove Co-Authored-By From Commits You Already Made

Settings don’t touch history. Every commit Claude made before you changed them still has the trailer, so you need Git to rewrite those messages.

Decision diagram: no credit anywhere uses attribution false, commits only uses commit empty string, your own wording uses a custom commit string, and commits already made need amend or rebase
Pick the fix by what you want Claude Code to write, and use Git for commits already made

Just the last commit

Run git commit --amend, delete the Co-Authored-By line in the editor, and save. That changes only the most recent commit.

Several recent commits

To clean a range in one go, let git rebase run a small command after each commit. This is the exact command we ran on the last three commits of our demo repo:

git rebase HEAD~3 -x 'git log -1 --format=%B | sed "/^Co-Authored-By: Claude/d" | git commit --amend --no-verify -F -'

For each commit, it reads the message, deletes any line that starts with Co-Authored-By: Claude, and amends the commit with the cleaned text. The --no-verify flag skips commit hooks during the rewrite, since the code itself isn’t changing.

Terminal running git rebase with -x to strip Co-Authored-By: Claude lines, then git log grep showing 0 matches and the last three commits with only the custom Assisted-by trailer left
After the rebase, no commit matches Co-Authored-By: Claude, and our custom trailer was left alone

Before the rebase, git log --grep="Co-Authored-By: Claude" found one commit. Afterward it found zero, and the Assisted-by line we wanted to keep was untouched.

Before you rewrite pushed commits

Rewriting gives each commit a new hash. If you already pushed them, you’ll need git push --force-with-lease, which overwrites the remote branch only if nobody else pushed to it since you last fetched.

Do this on your own feature branch, not on a shared main branch. If teammates built on those commits, their history won’t match yours. Our guide to GitHub push errors covers push errors if the force push is rejected.

Removing the Line From Pull Requests

The PR text comes from attribution.pr. Set it to an empty string, or use "attribution": false, and Claude Code stops adding the “Generated with Claude Code” footer to new pull request descriptions.

We didn’t open a real pull request in this test, since our demo repo had no remote, so this part follows the docs. For PRs that already exist, edit the description on your Git host; the setting won’t change them.

Cloud and Remote Control sessions can also add a Claude-Session trailer and a session URL. The docs say "sessionUrl": false inside attribution turns that off.

Try It Yourself

Practice on a throwaway repo before you change your real setup. Create a folder, run git init, add a small file, stage it, and add {"attribution": false} to .claude/settings.json. Then start Claude Code there and paste this prompt:

Commit the staged file with the message "Add first file". Use your normal commit format. Then run git log -1 and tell me in one line whether the message has any Co-Authored-By trailer.

Read the permission prompt before you approve. Then try a custom commit value and run the same prompt again to see your text appear.

Common Mistakes

  • Expecting the setting to clean old commits. It only affects commits Claude makes after you save it.
  • Using "attribution": false on a version older than v2.1.281. The whole settings file gets skipped, not just this key.
  • Putting the key in the wrong file. A rule in .claude/settings.local.json won’t reach your teammates; a committed .claude/settings.json will.
  • Mixing the old and new keys. Once attribution.commit or attribution.pr is set, includeCoAuthoredBy is ignored.
  • Writing broken JSON, like a trailing comma. Claude Code shows a settings error and may skip the file.
  • Force-pushing a shared branch after a rebase. Keep history rewrites to branches only you use.

Pro Tips

  • Set "attribution": false once in ~/.claude/settings.json if you never want the trailer, then forget about it.
  • For a team policy, commit .claude/settings.json so every clone gets the same rule without anyone editing their own config.
  • Glance at the command in Claude’s permission prompt. It shows the full commit message before anything is written.
  • Use git log --grep="Co-Authored-By: Claude" --oneline to find every commit that still has the trailer.
  • If you also want Claude’s built-in commit instructions gone, the reference documents includeGitInstructions; our settings.json examples show more keys you can copy.
  • Prefer slash commands for commits? The commit commands plugin is another way to shape how commits are written.

Cheat Sheet

Cheat sheet for removing Co-Authored-By from Claude Code commits: hide everything with attribution false, pick commit, pr and sessionUrl separately, the deprecated includeCoAuthoredBy key, and git commands to fix old commits
Every attribution setting and Git command from this guide on one card

Frequently Asked Questions

How do I stop Claude Code from adding Co-Authored-By to commits?

Add "attribution": false to ~/.claude/settings.json for all projects, or to .claude/settings.json for one repo. To hide only the commit line, use "attribution": {"commit": ""}.

Is includeCoAuthoredBy still supported?

Yes, but it’s deprecated since v2.0.62. Claude Code still honors includeCoAuthoredBy: false, but ignores it once you set attribution.commit or attribution.pr, so new configs should use attribution.

Why does my setting not work?

The usual causes are an old Claude Code version that rejects false, broken JSON, the key sitting in a file this project doesn’t read, or a managed setting from your organization. Start a new session after you edit the file, then check the next commit command in the permission prompt.

Will removing the trailer change who authored the commit?

No. In our test, every commit’s author stayed as the human Git user. The trailer only adds a co-author line at the end of the message.

Can I remove Co-Authored-By from commits that are already on GitHub?

Yes, by rewriting them with git commit --amend or git rebase -x and then pushing with git push --force-with-lease. Only do this on branches nobody else is building on.

Conclusion

To remove “Co-Authored-By: Claude” from Claude Code commits, add "attribution": false to your user or project settings file, which hides the commit trailer and the pull request line on Claude Code v2.1.281 or later, as our test on v2.1.332 confirmed. Use "commit": "" or "pr": "" to drop just one part, set your own commit text for a custom trailer, and move off the deprecated includeCoAuthoredBy key. For commits already made, amend the last one or run a short git rebase -x, and force-push only your own branches. If you hit other problems along the way, our list of common Claude Code errors and our Claude AI overview are good next stops.

Newsletter

New AI tools in your inbox

The best new tools and the AI news that matters, in one short email. Unsubscribe any time.

Free · No spam · Unsubscribe any time

✓ Looks like you’re subscribed

Loading Google’s sign-up form…

Looks like you’re already subscribed

Thanks for reading! New AI tools and the AI news that matters will land in your inbox.

Not subscribed yet? Refresh the page to load the sign-up form.

The sign-up form couldn’t load. If you use an ad or content blocker, allow news.google.com and reload the page.

Free instant check before you pay. Takes a few seconds.

Scroll to Top