Privacy and preparation
Git commit author names and emails: personal data in code history
By SourceX Editorial · Updated
Short answer
Yes, git commit author names and emails generally count as personal data: each commit records a person's name, email and timestamp, and trailers and tags often add more. For a licensed code history, rewrite identities in a separate delivery copy with consistent pseudonymous IDs, never in the live repository, so authorship patterns survive while names do not.
Key takeaways
- Every commit stores an author and a committer, each with a name, an email and a timestamp with a time zone offset.
- A .mailmap file changes how identities display; it does not remove them from the repository.
- Rewriting history in a separate delivery copy removes identities but changes every commit hash.
- Consistent pseudonymous IDs keep the who-wrote-what and who-reviewed-whom patterns that make code history useful.
- The mapping between real identities and IDs stays private and is never part of a delivery.
Are git commit author names and emails personal data?#
Git commit author names and emails are personal data in most privacy frameworks because they identify an individual engineer. Each commit records an author and a committer, each with a name, an email address and a timestamp that includes a time zone offset.
Early commits often carry personal Gmail or university addresses from before company accounts existed. Contractors may appear under agency domains, and some engineers appear under several identities as laptops and accounts changed. All of those point to real people, including people who left long ago.
Whether a specific law applies, such as GDPR for engineers based in the EU, is a question for counsel. The practical point for a CTO is simpler: a code history delivered with raw identities shares a detailed activity record for every engineer who ever committed.
Where identities hide in a repository#
Identities hide well beyond the author field, so a rewrite that changes only author and committer leaves names behind. Check each location below before choosing a method.
Commit messages also mention customers and paste ticket text, so scan them for customer names in the same pass.
| Location | What it contains | Typical treatment |
|---|---|---|
| Author and committer fields | Name, email and timestamp on every commit | Rewrite to consistent pseudonymous IDs |
| Commit message trailers | Co-authored-by, Signed-off-by and Reviewed-by lines with names and emails | Rewrite with the same mapping |
| Annotated tags | Tagger name and email on releases | Rewrite with the same mapping |
| Branch and ref names | Names such as an engineer's first name plus a feature | Rename, or drop non-release branches |
| Code comments and files | TODO notes with names, AUTHORS and CODEOWNERS files | Scan and replace, or exclude the files |
| Signatures | GPG or SSH signature data tied to personal keys | Strip signatures in the delivery copy |
| Hosted review data | Pull request comments, approvals and usernames | Export separately and apply the same mapping |
- 01Your work records
- 02Personal details removed
- 03You approve the release
- 04Licensed to AI developers
Mailmap pseudonymization vs a history rewrite#
A .mailmap file maps old names and emails to a canonical identity when git displays history, while a history rewrite replaces the stored values in a new copy of the repository. Only the rewrite removes identities from what you deliver.
The common working pattern combines both. Use a mailmap to consolidate each engineer's aliases into one identity, then run a rewrite with a tool such as git filter-repo on a mirror clone. The live repository and its commit hashes stay untouched.
| Approach | What it changes | Fits when | Watch out for |
|---|---|---|---|
| Mailmap file | How names display in log and blame output | Merging duplicate identities before a rewrite | Stored objects still contain the original names and emails |
| History rewrite in a delivery copy | Stored author, committer, tagger and trailer values | Delivering a full, working code history | Every commit hash changes, breaking references from tickets |
| Commit metadata export | A table of commits with pseudonymous IDs, files and diffs | The buyer wants commit data rather than a repository | Some repository structure and fidelity is lost |
Why consistent IDs keep authorship patterns#
Consistent pseudonymous IDs preserve authorship patterns, such as who owned which module, who reviewed whose changes and how expertise moved through a codebase. Those patterns are part of why engineering histories interest AI developers, so destroying them lowers the value of the package.
A random replacement on every commit breaks every pattern. A stable ID per person, generated from a keyed hash or a lookup table, keeps the patterns while hiding the person. Resolve duplicates first, so one engineer with several email addresses becomes one ID rather than a handful of apparent strangers.
Label bots and service accounts separately, such as dependency update bots and CI users. Their commits are useful context, and counting them as people distorts the picture of human work.
A rewrite procedure for a delivery copy#
A rewrite procedure for a delivery copy should run in an isolated workspace and end with a search proving no original identities remain. Write the steps down so the same method applies to every repository in scope.
For secrets, open-source scanners such as Gitleaks and TruffleHog search git history for passwords, API keys and tokens. Gitleaks' README was updated in May 2026 to say the project is feature complete and future releases will be security patches only, which is worth weighing when you choose a tool to rely on.
- Make a mirror clone of each repository into a restricted workspace.
- List every distinct author, committer and tagger identity across the full history.
- Merge aliases into one identity per person with a mailmap file.
- Assign each person a stable ID and a role tag, such as employee, contractor or bot.
- Rewrite author, committer, tagger and trailer values with the same mapping across all repositories.
- Scan code, comments and messages for remaining names, emails and customer references.
- Run a secret scanner over the full history and rotate anything it finds.
- Search the rewritten copy for every original email address and confirm none remain.
- Store the mapping table separately under restricted access and never deliver it.
Illustrative: a vertical SaaS company prepares its GitLab history#
Illustrative: a fictional software company serving freight brokers runs a self-managed GitLab instance with many years of history across its core application, carrier integrations and infrastructure code. Early commits used the founders' personal email addresses, and contractors from several agencies appear under agency domains.
The CTO's team merged aliases with a mailmap, assigned stable IDs with role tags and rewrote a mirror copy, including Signed-off-by trailers and release tags. Branch names containing first names were dropped, and the AUTHORS file was excluded. Jira issues that cited old commit hashes were linked to the new hashes through a private lookup table.
The delivered history still showed which engineers owned the billing module and how reviews flowed between teams, without naming anyone. A search for every original email in the rewritten copy came back empty, and that result went into the preparation record.
How SourceX approaches code history#
SourceX handles identity rewriting in the Preparation step of the SourceX five-step transaction, after the Rights step has confirmed that the company owns the code, that contractors assigned their work, and that customer-owned or third-party code is carved out. The supplier approves the mapping method and reviews the verification result before Approval.
The method, scan results and exclusions are recorded in the privacy record of the SourceX Evidence Packet, while the mapping table stays with the supplier.
Frequently asked questions
Do we have to rewrite our live repository?
No. Licensing preparation happens on a separate delivery copy, and the live repository, its hashes and its links stay as they are. Requests from former employees to remove their details from internal systems are a separate matter, governed by your retention practices and privacy obligations, which counsel can advise on.
Should commit timestamps be changed too?
Timestamps carry time zone offsets and working hours that can hint at where and when a person worked. Some teams keep dates but normalize time zones, or shift every timestamp in a repository by the same hidden offset. Agree the choice with the buyer, because commit timing matters for some uses.
Are GitHub noreply addresses still personal data?
A noreply address usually contains a username, and a username can be looked up on the hosting platform, so it still points to a person. Treat noreply addresses like any other identity and map them to the same stable ID as that person's other addresses.
What about open-source code vendored into our repositories?
Vendored libraries carry their own authors, license files and copyright notices, and those usually stay as they are or are excluded from the license scope. The rights question for third-party code is separate from the privacy question for your own engineers, and both belong in the review.
Do former employees need to be told?
That depends on the notices employees received, the laws where they worked and the terms of the license. Counsel reviews this deal by deal. Pseudonymous IDs reduce the exposure, but on their own they do not answer the notice question.
Sources
- Gitleaks is an MIT-licensed tool for detecting secrets such as passwords, API keys and tokens in git repositories, files and stdin. Source
- On May 21, 2026, the gitleaks README was updated to state that "Gitleaks is feature complete," that future releases will be security patches only, and that the maintainer is shifting focus to Betterleaks. Source
- TruffleHog, an AGPL-3.0 open-source secret scanner from Truffle Security, says it classifies over 800 secret types and scans sources including Git, chats, wikis, logs, object stores and filesystems. Source
Related resources
- QuestionWho owns enterprise data?
- QuestionDo AI labs buy code?
- InsightHow do I de-identify source code for AI training?
- InsightHow do I de-identify CAD and engineering drawings for AI training?
- InsightHow do I de-identify code reviews and pull requests for AI training?
- SolutionData partnerships between businesses and AI developers
See if your company qualifies
A short company assessment. No data uploads are needed.