I tried hiding the commit/pull request attribution for Claude Code

I tried hiding the commit/pull request attribution for Claude Code

Claude Code automatically adds attribution to commits and pull requests. This article provides a detailed explanation of the `attribution` setting that controls this behavior, covering everything from the roles of its three sub-keys to actual configuration methods!
2026.09.22

This page has been translated by machine translation. View original

Hello, I'm Tsukuboshi (tsukuboshi0755)!

When you let Claude Code handle commits, trailers such as Co-Authored-By are automatically added to the end of commit messages.
Some people may want to remove this attribution to comply with their repository's commit message conventions.

This attribution is not controlled by a single key — commit trailers, pull request attribution text, and session URLs are three separate types, each managed by their own key.
Therefore, if you only configure some of the keys, the attribution you intended to remove may remain.

In this article, I'll introduce the attribution setting that controls the attribution added by Claude Code to commits and pull requests!

What is attribution?

attribution is a setting key that customizes the attribution added to commits and pull requests created by Claude Code.
It is added to commits as a git trailer and to pull request descriptions as plain text, and can be individually controlled with three subkeys: commit, pr, and sessionUrl.

The main specifications are as follows.

Item Content
Setting key attribution (subkeys are commit, pr, and sessionUrl)
Default value Not set (default attribution for each subkey is applied)
Accepted values commit and pr accept strings, sessionUrl accepts a boolean
Setting scope All configuration files (user, project, local, admin)

The targets controlled by each subkey are as follows.

Subkey Target Content added by default
attribution.commit Attribution added to commits Co-Authored-By: <model name> <noreply@anthropic.com>
attribution.pr Attribution in pull request descriptions 🤖 Generated with [Claude Code](https://claude.com/claude-code)
attribution.sessionUrl Whether to include a claude.ai session link true (link is included)

If an empty string is specified for commit or pr, that attribution is removed. Specifying false for sessionUrl prevents the session link from being added.

Software Version

This article was verified in the following environment.

Item Version
Claude Code 2.1.267

The setting specifications also reference the official documentation as of September 21, 2026.

How to Configure

Add attribution to your user settings file ~/.claude/settings.json and specify the subkeys for the targets you want to control.

Changing commit attribution (attribution.commit)

For commit, specify the attribution to add to commits as a string.
Since you can specify a string including trailers directly, you can replace it with custom text and a Co-Authored-By trailer as shown below.

settings.json
{
  "attribution": {
    "commit": "Generated with AI\n\nCo-Authored-By: AI <ai@example.com>"
  }
}

If not set, Co-Authored-By: <model name> <noreply@anthropic.com> is added.
The model name here will be the name of the model currently in use for the session.
However, if the Claude model can be identified but the version cannot be determined, it will be listed as Claude. If it cannot be identified as a Claude model at all, it will be listed as Claude Code.

If you want to remove the commit attribution entirely, specify an empty string.

settings.json
{
  "attribution": {
    "commit": ""
  }
}

Changing pull request attribution (attribution.pr)

For pr, specify the attribution to add to the pull request description as a string.
If not set, 🤖 Generated with [Claude Code](https://claude.com/claude-code) is added, so specifying an empty string here will hide it as well.

settings.json
{
  "attribution": {
    "pr": ""
  }
}

Stopping session URL from being added (attribution.sessionUrl)

Unlike the others, sessionUrl takes a boolean rather than a string. Setting it to false prevents the session link from being added.
This link is added to commits as a Claude-Session trailer and to pull requests as a link in the description.

settings.json
{
  "attribution": {
    "sessionUrl": false
  }
}

Removing all attribution

By specifying all three subkeys together, all attribution will no longer be added.
The official documentation also presents this combination as the way to hide all attribution.

settings.json
{
  "attribution": {
    "commit": "",
    "pr": "",
    "sessionUrl": false
  }
}

Verification

I prepared a repository for testing, created commits and pull requests before and after applying the settings, and compared how they appeared on GitHub.

Comparing commit attribution

In the commit message itself, only the trailer lines change, but the visual difference is somewhat larger on GitHub's commit detail page.

With commit unset, the following Co-Authored-By trailer was added in my environment.

Commit with attribution

What I want to draw attention to is not the content of the commit message itself, but the author line above it.
It reads tsukuboshi and claude committed, with two icons side by side.
Since GitHub treats Co-Authored-By as a co-author designation, the account listed in the trailer is treated as one of the commit's authors.

On the other hand, when commit is set to an empty string, the same repository's commits are displayed as follows.

Commit without attribution

Not only does the trailer disappear, but the author line also becomes just tsukuboshi committed, and the co-author icon is no longer displayed.
If you want to keep the appearance of your commit history consistent, the difference that matters is less about the trailer lines in the commit message and more about this author line.

Comparing pull request attribution

Since pull request attribution is plain text rather than a git trailer, the only thing that changes is the content of the description.

With pr unset, the following single line was added at the end of the description in my environment.

Pull request with attribution

Looking at the description highlighted in red, 🤖 Generated with Claude Code appears as a separate paragraph from the body text I wrote myself.

On the other hand, when pr is set to an empty string, the same repository's pull request description looks as follows.

Pull request without attribution

The red-highlighted area now contains only the body text I wrote, and the attribution line is gone.
Unlike commits, the author display does not change, so what pr removes is limited to this one line in the description.

Notes

Setting commit and pr to empty strings alone will leave the session URL

Setting commit and pr to empty strings removes the Co-Authored-By trailer and the pull request attribution text, but the session URL remains since it is managed by a separate key called sessionUrl.
If attribution is still appearing, check whether you have also specified sessionUrl.

According to the official documentation, what sessionUrl controls is the link added when commits or pull requests are created from a cloud (Claude Code in the browser) or Remote Control session.
Commits from sessions that are entirely terminal-based CLI do not have this trailer added in the first place.
If you set this and see no change, it is worth checking which execution environment you are committing from.

includeCoAuthoredBy is deprecated

Previously, the approach of setting includeCoAuthoredBy to false was commonly known, but it was replaced by attribution in v2.0.62 and is now deprecated.
For compatibility, includeCoAuthoredBy: false in configuration files that existed before attribution will continue to be read.
However, once you set attribution.commit or attribution.pr, includeCoAuthoredBy is ignored, so it is advisable to use attribution when writing new configuration.

Setting only one of them leaves the other with default attribution

If you set only one of commit or pr, the one you did not set will use the default attribution.
For example, if you only set pr to an empty string in order to remove the pull request attribution text, the Co-Authored-By trailer will remain on the commit side.

References

https://code.claude.com/docs/en/settings-reference.md

https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors

Closing

In this article, I introduced the attribution setting that controls the attribution added by Claude Code to commits and pull requests.

Since three keys are involved in what appears as a single attribution display, understanding which key is responsible for which display is the key point when configuring this setting.
In particular, the difference where commit and pr take strings while only sessionUrl takes a boolean is something I found easy to get confused about when writing the configuration.

Whether to keep or remove attribution is something that depends on your repository's operational policies.
If you want to keep a record in your history that a commit was AI-generated, leaving the default as-is is appropriate. If you want to maintain a consistent commit message format, removing it is also a valid choice.

If you have been bothered by the attribution added to Claude Code commits, please take a moment to review the attribution setting!

That's all from Tsukuboshi (tsukuboshi0755)!


Claudeならクラスメソッドにお任せください

クラスメソッドは、Anthropic社とリセラー契約を締結しています。各種製品ガイドから、業種別の活用法、フェーズごとのお悩み解決などサービス支援ページにまとめております。まずはご覧いただき、お気軽にご相談ください。

サービス詳細を見る

Share this article

AI白書