We committed some password into our bitbucket repository this is against our organisation security policy, so I have used the BFG Repo Cleaner to replace all the passwords with the word Removed by creating a mirror locally then
bfg --replace-text passwords.txt my-repo.git
it does the job as described on their website, the password does get removed!
the surprise is that it
- replace the passwords in the file
- deletes the old commits
- then make some new commits rather than rewrite the history based on the old commits....
so the problem is the password still can be viewed from the old bitbucket url which points to the old commits
my question is how can I removed the deleted commits from bitbucket or perhaps from git history? which in turn stops the URL points to the deleted/old commits showing the password we intended to remove?