... to, you can use the beautiful Scala language to customize the BFG. Which has got to be better than Bash scripting at least some of the time. The BFG will update your commits and all branches and tags so they are clean, but it doesn't physically delete the unwanted stuff. Examine the repo to make sure your history has been updated, and then use the standard git gc command to strip out the unwanted dirty data.