Skip to main content
EcoutezNew from the Gitmore team: Ecoutez — in-product feedback at the exact moment it matters →
Glossary

What Are Co-authored-by Trailer?

A line at the end of a Git commit message, in the form 'Co-authored-by: Name <email>', that credits one or more additional authors of the commit. GitHub and other tools read it to show co-authors, and AI coding agents use it to mark their contributions.

2-minute setup • No credit card required

What it means

A Git commit has exactly one author and one committer. To credit anyone else, such as a pair-programming partner or a reviewer who rewrote part of the change, the convention is a trailer: a 'Key: value' line in the last paragraph of the commit message, separated from the body by a blank line. Git has built-in support for trailers (Signed-off-by is the best-known one, and git interpret-trailers and git log's %(trailers) format work with them), and Co-authored-by follows the same format. The syntax is: a blank line after the message body, then one line per co-author, 'Co-authored-by: Full Name <email@example.com>'. Each co-author gets their own line. GitHub recognises these trailers: the commit shows each co-author's avatar next to the author, and if the email matches an email on a GitHub account (including the account's noreply address), the commit can count toward that person's contribution graph. GitHub also adds the trailer itself when you squash-merge a pull request with commits from several people. AI coding agents have adopted the same convention. Claude Code, for example, by default appends a trailer such as 'Co-Authored-By: Claude <noreply@anthropic.com>' to commits it creates (recent versions may include the model name, like 'Claude Opus'; the noreply@anthropic.com address is the stable part) and can add a 'Generated with Claude Code' line to pull request descriptions. Other agents use trailers, bot author accounts, or both. Trailer keys are generally matched without regard to case, so 'Co-Authored-By' and 'Co-authored-by' are treated the same by most tools.


Why Co-authored-by Trailer matter

The trailer is the simplest, most portable attribution record Git has. It travels with the commit through forks, mirrors, and migrations between GitHub, GitLab, and Bitbucket, so it does not depend on any one platform's database. For people, it gives fair credit for pair and mob programming. For AI, it is currently one of the most reliable signals for measuring how much shipped work AI agents wrote, which matters for engineering leaders, for clients who ask about AI use, and for licensing and compliance questions. It is not tamper-proof: anyone can add or remove a trailer, and some tools or settings disable it. That is why attribution reports based on it should be treated as a lower bound and should treat commits without any signal as human-written.


How to measure

List co-author trailers with Git: git log --format='%h %an %(trailers:key=Co-authored-by,valueonly)' shows each commit's author and co-authors. To count commits with an AI co-author, filter the output for known agent names or emails (for example the Claude noreply address). For pull requests, also check PR descriptions for agent footers and PR authors for bot accounts, because squash merges may rewrite or combine trailers. Report results at the PR or commit level over a fixed time window, and check whether your team's agent configuration has trailers turned on before comparing teams. Gitmore's AI agent ledger reads trailers, footers, bot accounts, and branch prefixes conservatively to attribute work to agents such as Claude Code, Copilot, Cursor, and Codex without reading source code.


Real-world example

Two developers pair on a bug fix. The driver commits with this message: Fix rounding error in invoice totals Totals were rounded per line instead of on the final sum. Co-authored-by: Sam Lee <sam.lee@example.com> On GitHub, the commit shows both avatars. Later the same week, a developer asks Claude Code to add a regression test; the resulting commit ends with 'Co-Authored-By: Claude <noreply@anthropic.com>'. When the team lead reviews monthly AI code share, that commit is counted as agent-assisted, while the pairing commit is counted as human-written with two human authors.

FAQ

Common questions

What is the correct Co-authored-by syntax?

End the commit message with a blank line, then one line per co-author: 'Co-authored-by: Full Name <email@example.com>'. The trailer must be in the final paragraph of the message, with no blank lines between multiple trailers.

How do I add a co-author to a Git commit?

Write the commit message in your editor (git commit without -m, or with several -m flags) and add the trailer at the end. You can also use git commit --trailer 'Co-authored-by: Name <email>' in recent Git versions. GitHub Desktop and some IDEs have a co-author field that adds it for you.

Why does my co-author not show up on GitHub?

The usual causes are a missing blank line before the trailer, a typo in the key, or an email that is not linked to the co-author's GitHub account. Use an email from their account, or their GitHub noreply address, and keep the trailer in the last paragraph.

Why does Claude Code add Co-Authored-By: Claude to commits?

To record that the commit was created with AI assistance, using Git's standard co-author convention. It is a default that can be turned off in Claude Code's settings. Keeping it on makes AI-assisted work visible in history and measurable later.

Is Co-authored-by a reliable way to detect AI-generated code?

It is a strong positive signal but not a complete one. Many tools do not add it, users can remove it, and squash merges can drop or merge trailers. Combine it with other signals (PR footers, bot authors, branch names) and treat the result as a minimum.

Track Co-authored-by Trailer Automatically

Gitmore turns your git activity into automated reports with real metrics — delivered to Slack and email.

Get Started Free

No credit card • No sales call • Reports in 2 minutes