git filter-repo
A command-line tool for rewriting Git history, commonly used to completely remove sensitive files or large files from a repository's history.
Timeline (last 90 days)
Even if history is cleaned locally with git filter-repo, remote platforms such as GitHub may still retain caches or propagate it through forks, so the platform must be contacted for complete removal.
git rm only deletes the file in the latest commit, and content in historical commits can still be recovered via git log; complete removal requires rewriting history with git filter-repo or BFG Repo-Cleaner.
A more thorough approach is to rewrite history with tools such as git filter-repo or BFG, but even so it should be treated as already leaked, and rotation is always the first priority for limiting the damage.
The Git rebase documentation describes --no-rerere-autoupdate as a good way to review what git-rerere has done and catch potentially incorrect merges.
git filter-branch and git filter-repo can batch-rewrite commit content (commit messages, authors, timestamps, etc.), recalculating the hash values of all affected commits and producing an entirely new chain parallel to the original history.
When a leak has already occurred, git filter-repo or BFG Repo Cleaner should be used to remove sensitive data from history, and collaborators should be forced to re-clone the repository.
All Facts (6)
The Git rebase documentation describes --no-rerere-autoupdate as a good way to review what git-rerere has done and catch potentially incorrect merges.
60%UnverifiedWhen a leak has already occurred, git filter-repo or BFG Repo Cleaner should be used to remove sensitive data from history, and collaborators should be forced to re-clone the repository.
60%UnverifiedEven if history is cleaned locally with git filter-repo, remote platforms such as GitHub may still retain caches or propagate it through forks, so the platform must be contacted for complete removal.
50%Unverifiedgit rm only deletes the file in the latest commit, and content in historical commits can still be recovered via git log; complete removal requires rewriting history with git filter-repo or BFG Repo-Cleaner.
50%UnverifiedA more thorough approach is to rewrite history with tools such as git filter-repo or BFG, but even so it should be treated as already leaked, and rotation is always the first priority for limiting the damage.
50%Unverifiedgit filter-branch and git filter-repo can batch-rewrite commit content (commit messages, authors, timestamps, etc.), recalculating the hash values of all affected commits and producing an entirely new chain parallel to the original history.
50%