
I tried hiding the commit/pull request attribution display for Claude Code
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—there are three types: commit trailers, pull request attribution text, and session URLs, each managed by a separate key.
Therefore, if you only configure some of the keys, attribution you thought you removed may still remain.
In this article, I'll introduce the attribution setting that controls the attribution Claude Code adds to commits and pull requests!
What is attribution
attribution is a configuration key that customizes the attribution added to commits and pull requests created by Claude Code.
It is added as a git trailer to commits, and as plain text to pull request descriptions.
The content added can be individually controlled using three sub-keys: commit, pr, and sessionUrl.
The main specifications are as follows.
| Item | Content |
|---|---|
| Configuration key | attribution (sub-keys are commit, pr, and sessionUrl) |
| Default value | Not set (standard attribution is added for each sub-key) |
| Possible values | commit and pr accept strings, sessionUrl accepts a boolean |
| Configuration scope | All configuration files (user, project, local, admin) |
The targets controlled by each sub-key are as follows.
| Sub-key | Target | Default content added |
|---|---|---|
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 the claude.ai session link | true (link is included) |
Specifying an empty string for commit and pr removes that attribution, and specifying false for sessionUrl prevents the session link from being added.
Note that the configuration specifications referenced here are based on the official documentation as of September 21, 2026.
How to configure
Add attribution to your user settings at ~/.claude/settings.json and specify the sub-keys 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 a combination of custom wording and your own Co-Authored-By trailer as shown below.
{
"attribution": {
"commit": "Generated with AI\n\nCo-Authored-By: AI <ai@example.com>"
}
}
If left unconfigured, the <model name> part will vary depending on the model being used in the session.
If the specific version can be identified, that model name is used; if it can be identified as a Claude model but the version cannot be determined, Claude is used; and if it cannot be identified as a Claude model at all, Claude Code is used.
The last case applies when you are using a non-Claude model by pointing ANTHROPIC_BASE_URL to a custom endpoint.
To remove the commit attribution entirely, specify an empty string.
{
"attribution": {
"commit": ""
}
}
Changing pull request attribution (attribution.pr)
For pr, specify the attribution to add to pull request descriptions as a string.
Just like commit, you can hide it by specifying an empty string.
{
"attribution": {
"pr": ""
}
}
Stopping session URL from being added (attribution.sessionUrl)
Unlike the others, sessionUrl takes a boolean value rather than a string, and specifying false prevents the session link from being added.
This link is added as a Claude-Session trailer in commits and as a link in the pull request description.
{
"attribution": {
"sessionUrl": false
}
}
Removing all attribution
The combination of specifying all three sub-keys together is also described in the official documentation as the way to hide all attribution.
{
"attribution": {
"commit": "",
"pr": "",
"sessionUrl": false
}
}
Software version
The behavior described in this article was verified in the following environment.
| Item | Version |
|---|---|
| Claude Code | 2.1.267 |
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
While the commit message itself only gains or loses trailer lines, the visual difference is a bit more noticeable on GitHub's commit detail page.
With commit unconfigured, in my environment, the Co-Authored-By trailer was added as shown below.

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, and two icons are displayed 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 display for commits in the same repository looks like this.

Not only does the trailer disappear, but the author line also becomes just tsukuboshi committed, and the co-author icon is no longer displayed.
Comparing pull request attribution
Since pull request attribution is plain text rather than a git trailer, the only change is within the description.
With pr unconfigured, in my environment, the following single line was added at the end of the description.

Looking at the description highlighted with a red border, 🤖 Generated with Claude Code appears one line below the body I wrote myself.
On the other hand, when pr is set to an empty string, the description for pull requests in the same repository looks like this.

The red-bordered area contains only the body I wrote myself, and the attribution line has disappeared.
Unlike with commits, the author display does not change, so what pr removes is limited to this single line in the description.
Notes
Standard attribution remains for keys that are not configured
Since the three sub-keys are independent of each other, attribution for keys that are not specified will remain as-is.
For example, if you only set pr to an empty string in an attempt to remove just the pull request attribution, the Co-Authored-By trailer will still be present on the commit side.
Even if you set both commit and pr to empty strings, the session URL falls under a separate key called sessionUrl, so it will persist in cloud and Remote Control sessions as described below.
If attribution is still remaining, check whether false is specified for sessionUrl.
Session links are only added in cloud and Remote Control sessions
According to the official documentation, what sessionUrl controls is the link added when commits and pull requests are created from a cloud (Claude Code in the browser) or Remote Control session.
Commits from sessions that run entirely in the terminal CLI do not have this trailer added in the first place.
If you configure it but see no change, it's a good idea to first check which execution environment you are committing from.
Instructions in CLAUDE.md take priority
According to the official documentation, instructions related to attribution written in CLAUDE.md or memory take priority over the commit and pr content in attribution, unless specified in admin settings.
If the attribution does not turn out as intended after configuration, check whether any related entries remain in CLAUDE.md.
includeCoAuthoredBy is deprecated
Previously, setting includeCoAuthoredBy to false was a known approach, but it was replaced by attribution in v2.0.62 and is now deprecated.
Note that the default for includeCoAuthoredBy is true, so if left unconfigured, both the trailer and attribution text will be added.
For compatibility, includeCoAuthoredBy: false written in existing configuration files will continue to be read.
However, once attribution.commit or attribution.pr is configured, includeCoAuthoredBy is ignored, so it is safer to use attribution when writing new configurations.
References
In closing
In this article, I introduced the attribution setting that controls the attribution Claude Code adds to commits and pull requests.
Since three keys are involved in what appears as a single piece of attribution, the key point when configuring it is understanding which key is responsible for which display.
In particular, the difference that 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 preserve a record in the history that the commit was AI-generated, leaving it at the default is appropriate; if you want to keep commit message formatting consistent, removing it is also an option.
If you've been curious about the attribution added to Claude Code commits, please take a moment to review the attribution setting!
That's all from Tsukuboshi (tsukuboshi0755)!
