I maintain open-source repositories and have received requests to remove names or email addresses from commit history. How can I handle these without losing track of the code and its licensing?
How do you handle requests to remove personal details from Git commits?
Answers
If the goal is to remove an email address rather than the code, you can rewrite the affected commits with replacement author details. Check committer details and commit messages too, since the identifier may appear in more than one place.
The catch is that rewriting a commit changes its hash and the hashes of its descendants. Coordinate the change with contributors, because existing branches will need to be reconciled with the new history. Back up the repository first and verify the rewritten history before replacing the published one.
Reply to this answer
The legal question isn't as simple as public commit equals no privacy rights, or every request automatically requires a rewrite. GDPR applicability and any erasure obligation depend on the circumstances, including who controls the data and whether an exception applies.
A work email can still identify a person, so don't dismiss a request just because it uses a business domain. If you need a legal determination, get qualified advice rather than relying on a general rule from a discussion.
Reply to this answer
Start by asking what they want removed and where it appears. Removing an identifier is a different request from removing a contribution, and changing author metadata doesn't by itself settle copyright or license questions.
Keep any licensing or attribution requirements in mind before choosing replacement details. If those requirements are unclear, check the project's license and get legal advice where needed.
Reply to this answer
For future contributions, document that commit metadata is public and suggest contributors use an address they're comfortable publishing. That won't resolve existing requests, but it gives people a chance to choose before committing.
Reply to this answer
Add your answer
Answers are reviewed before publication.
p.461!vordelix:
Rewriting the main repository won't automatically change existing clones or forks. The old commits may still be available elsewhere.