We have all been there. You are pushing a hotfix at midnight, you forget to remove a test API key you hardcoded during debugging, and it ends up in the main branch. Secrets leaking into version control is one of the most common and costly security mistakes in software development.
https://medium.com/@mgaurang123/handling-leaked-secrets-and-credentials-in-version-control-repositories-e11149b8a8b9