git-filter-repo

git-filter-repo is a Git add‑on that lets you rewrite an entire repository’s history efficiently, making it a modern replacement for git filter-branch and an alternative to BFG Repo Cleaner. It is typically used to remove or edit sensitive data, shrink repo size, or rearrange directories and tags across all commits. [perplexity.ai]

是一个 Git 附加工具,能让你高效地重写整个仓库的历史记录,可作为 git filter-branch 的现代替代方案,也可取代 BFG Repo Cleaner。它通常用于删除或编辑敏感数据、压缩仓库大小,或者在所有提交中重新组织目录和标签。 [perplexity.ai]

install

# Windows 10
scoop install git-filter-repo