rtyley / bfg-repo-cleaner

Removes large or troublesome blobs like git-filter-branch does, but faster. And written in Scala
https://rtyley.github.io/bfg-repo-cleaner/
GNU General Public License v3.0
10.95k stars 540 forks source link

Strip large files except for particular filetype/glob #299

Closed osdiab closed 5 years ago

osdiab commented 5 years ago

Hi, I'm trying to strip out all the uncompressed images from my website repo, but I don't want to remove relatively large Javascript sourcemaps.

So I run this command:

bfg --strip-blobs-bigger-than 800K --filter-content-excluding "*.js.map"

but it seems like --filter-content-excluding only applies to the text replacement functionalities, not to the --strip-blobs-bigger-than field.

Is there a way to filter those changes out, either via the tool, or with git commands somehow?

javabrett commented 5 years ago

If you find that BFG is unable to express the filtering you need, and you are not able to enhance it to do-so, then the standard workaround is:

osdiab commented 5 years ago

OK, thanks for the tip! Will close, assume this is wontfix.