0

I am cleaning large git repository using BFG Repo-Cleaner. In particular, I want to remove a directory.

I do mirror clone as mentioned in https://rtyley.github.io/bfg-repo-cleaner/

I am using command java -jar bfg-1.13.0.jar --delete-folders FolderA <repo_path> to delete the folder named "FolderA" throughout repository. I am concerned that if "FolderA" is in multiple locations e.g. /Path1/FolderA, /Path2/SubPath1/FolderA, and so forth, how do I specify to delete "FolderA" only in one of the paths?

Thanks

cmp
  • 35
  • 6
  • 2
    Check out this answer from the BFG author: https://stackoverflow.com/a/21172871/86233 – Paul Bissex Mar 30 '20 at 15:52
  • @PaulBissex, thanks, that helps. I used option --strip-blobs-with-ids to cleanup the folder as per my need. – cmp Mar 30 '20 at 16:37
  • One update, ```--strip-blobs-with-ids``` with this option I was not able to delete the folder. Though the command succeeded, for some reason, the folder still existed after running ```git gc```. I finally chose ```--delete-folders``` option after ensuring there are no unintentional folder with same name. – cmp Mar 30 '20 at 23:26

0 Answers0