Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BFG remove multiple folders

I found that BFG is much faster than the original git-filter-branch.

We have multiple svn repo to move to even more git repositories, this implies some repository folder merges and splits. During the process I need to remove a set of root folders and I'd like to remove those to the whole history.

I tried to use the BFG --delete-folders and it works fine for one single folder but I did not find a way to delete multiple folders. Is it even possible ? or shall I loop to call BFG as many times as I have folders to remove ?

Thanks for any help.

like image 507
SeB.Fr Avatar asked Feb 07 '14 15:02

SeB.Fr


1 Answers

The argument to --delete-folders is a glob expression, so you should be able to just comma-separate the folder names, like this:

$ bfg --delete-folders "{folderA,folderB,folderC}" my-repo.git 

Good luck!

Full disclosure: I'm the author of the BFG Repo-Cleaner.

like image 185
Roberto Tyley Avatar answered Sep 28 '22 05:09

Roberto Tyley