Thanks for your feedbacks.
What finally worked best for me was using git-filter-repo
, see steps below:
Install the git-filter-repo
CMD: pip install git-filter-repo
Select the file path that you obtained from the EVE tool scan and use the following Git command to check its commit history.
CMD: $ git log --all -- file ./passwords
Remove the directory that is there in the commit history that is exposing the secrets
CMD : git filter-repo --invert-paths --path ./passwords
Add the origin and push the changes to the origin
CMD: git remote add origin (url link or clone repo link)
to push the changes use this cmd:
CMD: git push origin --force --all
Push the tags that have changed:
CMD :git push --force --tags
In my case, the git cherry-pick
solution involved too many conflicts to solve and after more than 1h of testing, I gave up.