53

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.

2 Answers 2

103

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.

Sign up to request clarification or add additional context in comments.

3 Comments

BFG is great! Is it possible to remove one instance of a folder with a given name in a repo if there are multiples? E.g. Given /config vs /some/other/path/config, removing the former from history without the latter?
Sorry I didn't want to sign up for Bountysource, so I'm giving you 5 karmas instead of $5. Amazingly easy to use.
Are the folder names relative, absolute, wildcards, or some kind of other matching system?
1

You can delete multiple folder using the command like this:

$ bfg --delete-folders "{List of folder separated by comma}" git-repo.git 

Thanks !

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.