简体   繁体   English

如何使用BFG repo清除程序删除一个文件夹/目录?

[英]How to delete one folder / directory using BFG repo cleaner?

How do I delete only one directory using BFG? 如何使用BFG仅删除一个目录?

The help says: 帮助说:

delete folders with the specified names (eg '.svn', '*-tmp' - matches on folder name, not path within repo)

Which seems to mean that --delete-folders "config" will match all folders named config, anywhere in the repository. 这似乎意味着--delete-folders "config"将匹配存储库中任何位置的所有名为config的文件夹。

I found the answer here: remove files from specific path 我在这里找到了答案: 从特定路径中删除文件

The author of BFG says it can't be done, unless you use a special command to dump all blobs for a given directory to a text file, and then use --strip-blobs-with-ids and provide that text file. BFG的作者表示无法完成,除非您使用特殊命令将给定目录的所有blob转储到文本文件,然后使用--strip-blobs-with-ids并提供该文本文件。

[UPDATE] This doesn't work for me. [更新]这对我不起作用。 I run the command: 我运行命令:

git log --format=%H -- cms/assets/ | xargs -IcommitId git rev-parse commitId:cms/assets/

I get a list of 8 blob ids. 我得到了8个blob id的列表。 I put those in text file, then I exec bfg -bi ~/tmp/blob-ids , and BFG exits saying: BFG aborting: No refs to update - no dirty commits found?? 我把它们放在文本文件中,然后我执行bfg -bi ~/tmp/blob-ids ,并且BFG退出说: BFG aborting: No refs to update - no dirty commits found??

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM