Hello everyone, I need help to remove sensitive info which is been committed in a repo. I've removed those credentials in the latest commit, but still, in previous commit histories I can view it, can anyone suggest how can I remove the same? (If it's possible to remove)
Hi @raghavan21_2000 and welcome to the community!
You can use BFG repo cleaner to rewrite history in older commits and remove sensitive info.
This is the website of the BFG tool:
You can also check the following reply in a StackOverflow post that was made by the author of BFG:
Before you use this tool, please ensure you take a backup of your repo in case anything goes wrong.
After you make changes with BFG, I would also suggest pushing first to another newly created empty repo so you can inspect if the changes look ok (you can delete this extra repo afterwards if you no longer need it). If everything looks ok, then push to your existing repo.
When you push to your existing repo, please let me know and I can run a garbage collection in order to remove the dangling commits from the remote repo.
Please feel free to reach out if you have any questions.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.