BFG Repo Cleaner is a tool that allows you to remove sensitive files from your git repo history. BFG assumes that the last commit in your HEAD branch is clean, and thus protects the last commit from being touched by the tool. All other commits in your HEAD branch will be wiped of the sensitive file. It should be noted that the tool provides an option to not touch the last commit of other branches in addition to your HEAD branch. This is explained below in step 4.B
For branches other than the HEAD branch, all commits will be wiped of the sensitive file including the last commit, if no other branches are specified to have their last commit protected.
-
Download BFG using the following command in terminal:
brew install bfg -
Clone a fresh copy of your repo, using the
--mirrorflag.git clone --mirror git://example.com/some-big-repo.git

