Legal asks for personal data in old commits to be erased entirely.
AdvancedScenarioSecrets, Signing and Security
Answer
Situation read → This is the same operation as a secret purge, with extra legal tracking.
What I'd do →
- Identify exact files and strings with
git log -S'<value>' --allandgit grepacross history. - Rewrite with
git filter-repo(path or text replacement) on a mirror clone. - Force-push all refs, invalidate caches, delete forks and old clones, rebuild CI caches and artifacts.
- Ask GitHub Support to remove cached references and PR refs; record each step for compliance.
Why → Anything pushed may be in forks, clones, CI logs and backups, so the process is wider than Git.
Interview tip → Prevention: never commit real personal data into test fixtures.
More on Secrets, Signing and Security
A developer pushed an AWS access key to a public repo 10 minutes ago. What is your first move?BeginnerAfter rotating the leaked key, you must purge it from repository history. How?AdvancedA push is rejected: "GH013: Repository rule violations found ... Push cannot contain secrets". What do you do?IntermediateSecret scanning alerts have piled up, and many look like false positives or old test credentials.IntermediateYou must set up signed commits on your laptop. Which method do you pick?BeginnerYour GPG signing key expires next week. What is the correct way to handle it?Intermediate