

Please use an alternative history filtering tool such as git filter-repo. These safety and performance issues cannot be backward compatibly fixed and as such, its use is not recommended. Hit Ctrl-C before proceeding to abort, then use anĪlternative filtering tool such as 'git filter-repo'įilter-branch manual page for more details to squelch this warning,Īlso, from the docs, git filter-branch has a plethora of pitfalls that can produce non-obvious manglings of the intended history rewrite (and can leave you with little time to investigate such problems since it has such abysmal performance). Git-filter-branch has a glut of gotchas generating mangled history When I used this command today after a long time, git started warning me about the usage of this command - WARNING: prune-empty -tag-name-filter cat -all The Problem Using filter-branch, your command would look like - git filter-branch -force -index-filter \ "git rm -cached -ignore-unmatch PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA" \

You have to invalidate the secret by going to the corresponding secret provider and generating a new secret. The forks and other local clones can (or) will not be updated. If you're using a public git repository, these changes are not enough. path PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA-2 Important Note: path PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA-1 \ Official git recommendation: to be used instead of git filter-branch. If you want to remove a file from git history, the history needs to be re-written.

If you've some file committed to a git repository, and you'd like to remove it, simply deleting the file and committing it again will not remove the file completely.
