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

前端 未结 1 1805
天命终不由人
天命终不由人 2021-02-13 20:20

How do I delete only one directory using BFG?

The help says:

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

1条回答
  •  广开言路
    2021-02-13 21:07

    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.

    [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. 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??

    0 讨论(0)
提交回复
热议问题