AI Commit Attribution: Why Merge Strategy Changes the Data
See why AI attribution trailers disappear from Git history, how merge methods skew your metrics, and a practical process for auditing provenance.

Why AI Authorship Disappears from Git History
Teams are starting to ask a practical question about AI-assisted development: after an agent's pull request merges, can you still tell an AI tool was involved? Commit trailers like Co-authored-by sound like the answer. In practice, what you see depends a lot on how the pull request was merged.
In a sample of 469 recent commits across 18 public repositories, 68.1% of single-parent commits had an AI attribution trailer. Among two-parent merge commits, the number dropped to 8.5%. That gap doesn't tell you how much code an AI wrote. It shows how easily the merge process changes what ends up in the default branch's history.
This matters if you're using Git history to power an AI-use dashboard, review provenance, or support an internal audit. A trailer is a helpful signal, but it's voluntary - and merge method changes where that signal lands. Here's what the sample shows, where common searches go wrong, and how to set up a more dependable attribution check without pretending the data proves more than it does.
Why does merge strategy change AI attribution?
A pull request can include an attribution trailer on commits in the pull request branch, and still end up with no trailer on the commit that lands in the default branch. That isn't automatically about different agent behavior. Often, it's just how the merge is performed.
Merge commits preserve branch commits, not their message metadata
A standard GitHub merge commit has two parents: one points to the previous state of the target branch, and the other points to the head of the pull request branch. The merge commit itself is a new Git object with its own message. GitHub typically generates that message from the pull request and branch details, plus a short description. It doesn't automatically copy the messages (or trailers) from the branch commits into the merge commit message.
This detail is easy to miss. Those original branch commits are still in the repository history. So the information may not be gone - just not present on the one commit your reporting process happens to inspect.
If your dashboard only looks at commits added to the default branch, the merge commit may be the only object it checks. In that setup, a trailer might exist on a branch commit and still be missing from the mainline merge commit.
Squash commits create a different attribution outcome
With squash merging, GitHub creates a single new commit that contains the pull request's changes. The default message comes from the pull request's commit title and message. If that text includes a Co-authored-by trailer, it can carry into the squashed commit.
Not guaranteed, though. People can edit the message, branch commits might not carry trailers, and repo workflows can vary. Still, it creates a real contrast: squash merging can discard the individual commit history while keeping an attribution trailer in the squashed commit message, while a regular merge can preserve the branch commits but leave the merge commit message without the trailer.
So don't treat parent count as a shortcut. A single-parent commit isn't proof of squash, and a two-parent commit isn't proof that attribution is absent everywhere. Parent count tells you what you're looking at. The pull request commit messages (and their history) tell you whether the trailer exists.
The operational takeaway is straightforward: measure the right artifact. Counting trailers on default-branch merge commits is not the same thing as checking the commits tied to each pull request.
What does the commit sample actually show?
The sample looked at 18 public repositories that merged a Copilot or Devin pull request during the week of November 8, 2026. For each repository, the analysis collected up to 30 recent commits from the default branch and classified them by parent count and whether their messages included an AI attribution trailer.
Out of 469 commits, 339 had one parent and 130 had two. The observed rates were:
| Commit type | Commits with an AI trailer | Total commits | Share with a trailer |
|---|---|---|---|
| Single-parent | 231 | 339 | 68.1% |
| Two-parent merge | 11 | 130 | 8.5% |
That's about an eightfold difference in trailer presence. It's a useful signal about how the history is being recorded in this sample, not proof that AI wrote more code in the single-parent cases or that teams using merge commits used AI less.
A pull-request check supports the mechanism
The same analysis checked eight merged agent pull requests individually. In all eight cases, the head commit carried the same kind of trailer. Two were squash merged, and the resulting mainline commits kept the trailer. Six used merge commits, and the merge commit messages did not.
This is a small sanity check, not a controlled experiment. It helps explain how the overall gap could show up, but it doesn't claim a universal rate across all GitHub repositories or for every agent product. The sample is limited by the time window, which repositories were selected, and how their owners configure merges.
Treat the rates as properties of a measurement setup
The biggest caveat is what you searched and how you filtered. A different time window, a different repository mix, or a different commit-selection rule could change the numbers. The original analysis also found different outcomes across different cuts of the same week. Without the sample size and time window, a percentage is hard to interpret.
For teams, the practical takeaway isn't "merge method is better." It's that changing merge settings can change an AI-attribution metric even if developers' AI usage doesn't change. If you compare teams or quarters, keep the merge strategy and audit procedure consistent - and visible next to the reported rate.
How can you audit AI attribution in GitHub?
A reliable audit needs to follow the pull request from its branch commits to the commit that actually landed on the default branch. Searching commit messages for a vendor name isn't enough, and looking only at default-branch commits can miss trailers that stayed on the branch.
Use a five-step audit process
- Resolve the bot identity from current repository data. Find the relevant pull requests using the actual bot login or app identity. Don't rely on what you remember from earlier months. If you use the wrong identity, you can get zero results - and that's easy to misread as "no attribution."
- Read the pull request's commits. Check the commits returned by the pull request, not just the commit visible on the default branch. That's where trailers can exist even when the merge commit message doesn't include them.
- Inspect the merge commit's parents. Identify the merge commit created by the pull request and check its parent count. One parent can show up with squash or rebase-style outcomes; two parents generally indicates a regular merge. Parent count is more dependable than trying to guess the merge method from message wording.
- Match trailer structure, then check identity. Look for a recognized trailer key at the start of a line, then verify the value matches the vendor or bot identity you care about. Don't count casual mentions of a product name in a branch name or description as trailers.
- Publish the scope with the rate. Include the date range, which repositories you sampled, how many pull requests or commits you inspected, how the merge-method breakdown looked, and exactly which artifact you measured. That's what makes the result repeatable.
Anchor the check on trailer syntax
A loose search for copilot or devin inside a merge commit message can generate false positives. The first line of a default merge message often includes the source branch name, and agent-created branches may include the tool's name. In the cited sample, a vendor-name search matched eight of 12 merged agent pull requests - but only four of those eight had an actual attribution trailer.
A sturdier approach looks for a trailer key at the start of a line, then filters the trailer value. For instance, an audit can recognize keys like Co-authored-by, Generated-by, or Assisted-by, and then search the associated value for an agent identity. Placement matters: if the phrase appears in the middle of a message, it's not necessarily a trailer.
Git's trailer convention treats trailers as a structured block at the end of a commit message, typically separated from the message body by a blank line. Following that convention reduces accidental matches and makes the rule easier to justify to reviewers.
Normalize identities without assuming one canonical string
One sample included three different identity strings tied to two vendors: a Copilot user identity, a Copilot coding-agent bot identity, and a Devin integration bot identity. Product names and email formats can shift over time, and tools may use more than one identity.
If your audit compares vendors using a single exact address you remember, you can silently drop valid rows. Instead, keep a documented set of identity patterns, record what you matched, and revisit the rules periodically. If you change the matching rule, comparisons across time can become misleading - so try to keep it stable when you compare periods.
What can commit trailers tell you about AI use?
A commit trailer is a low-cost provenance hint. It can help you answer whether a contributor or tool was credited in a specific commit message. It cannot, by itself, tell you how much code an AI wrote, whether a person reviewed the code, or whether the attribution is complete and accurate.
Presence is evidence; absence is not proof
Trailers are optional. Git doesn't require them, and a repo hook won't enforce them unless a team builds that enforcement. A developer might remove a trailer, an agent might omit one, or a merge workflow might leave it behind on a branch commit.
So a missing trailer doesn't prove AI wasn't involved.
At the same time, a trailer isn't a verified record of how work was produced. It may indicate assistance, co-authorship, or generated content depending on your organization's conventions, but the text alone doesn't measure the size of that contribution. If you're turning this signal into a metric or policy, define what "AI-assisted work" means in your context.
Keep the metric tied to the decision
For a lightweight engineering dashboard, trailer presence can be useful as a proxy for declared AI involvement - if you clearly document the limitations. For compliance or security review, it's not enough on its own. You may need pull request metadata, review records, tool logs, or a documented disclosure process based on the risk and requirements that apply to your organization.
And it's worth being careful with wording: don't present a repo-level trailer rate as an AI adoption rate. A more accurate phrasing is that a share of sampled commits carried a recognized attribution trailer under a stated detection method. That's less "compact," but it avoids confusing a record-keeping convention with actual tool usage.
Make the audit resilient to workflow changes
If a team switches from merge commits to squash merging, the observed trailer rate can rise even if underlying AI usage stays the same. Flip the direction and the rate can fall. In other words, merge settings are part of the measurement system, not just a Git preference.
A useful reporting routine tracks at least three things together: the attribution rate, the merge-method distribution, and where the attribution evidence came from. If one changes, you can say whether it reflects developer behavior, repository configuration, identity matching, or a change in the audit method itself.
Conclusion
AI attribution in Git history isn't just "search for a vendor name." Merge commits and squash commits can leave different evidence, branch names can create false positives, and agent identities can vary. In one limited sample, those effects lined up with a big difference in trailer visibility - but that gap describes the records, not the amount of AI-written code.
If you want an attribution metric, define the artifact you're measuring, inspect both the pull request commits and the resulting mainline commit, and publish the sample details and merge-method breakdown. Treat trailers as useful, but incomplete provenance. That gives teams something they can explain, reproduce, and improve - without turning a Git convention into a full account of AI use.