【发布时间】:2017-07-20 15:22:53
【问题描述】:
我正在尝试从 Git 历史记录中永久删除一个文件,因为它包含敏感数据。
为此,我使用bfg:https://rtyley.github.io/bfg-repo-cleaner/
文件名为app/config.json。
但是,我不想删除其他文件夹中名为 config.json 的其他文件。
我尝试了以下方法:
git clone --mirror git://example.com/some-repo.git
bfg --delete-files app/config.json my-repo.git
但我收到错误消息:
Error: *** Can only match on filename, NOT path *** - remove '/' path segments
如何只删除这个特定文件?
【问题讨论】:
标签: git bfg-repo-cleaner