Detecting and Removing Secrets Accidentally Committed to a Public Repo
You just realized a database password or API key is sitting in your public GitHub repo's commit history. Here's exactly what to do, from revoking credentials immediately to scrubbing the history so it never shows up again.