0

How to delete folders except some folders?

My command is

java -jar ../BFG_Repo-Cleaner/bfg-1.13.0.jar --delete-folders "!(folder1|folder2|folder3)"

I want all folders except folder1, folder2 and folder3.

1 Answer 1

1

There is no workaround for this with BFG, you'll have to explicitly mention all the folders you want to delete from history.

Example - java -jar ../BFG_Repo-Cleaner/bfg-1.13.0.jar --delete-folders "{Folder1,Folder2,Folder3}" YourApp.git

NOTE: Make sure you have different names for different folder, as BFG doesn't care about the path it will delete the folders with the associated name.

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

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

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.