BFG Repo-Cleaner

If you have commits in your git repo that you want removed, you can use git-filter-branch, but that can be pretty slow. Perhaps you accidentally committed and pushed a password, a db dump, email addresses, etc. BFG makes it easy to clean out those files and does it ~ 10-100x faster that git-filter-branch. See http://rtyley.github.io/bfg-repo-cleaner/ for more details. Here's a few examples from the documentation:

Delete all files named 'id_rsa' or 'id_dsa' :
$ bfg --delete-files id_{dsa,rsa} my-repo.git
Remove all blobs bigger than 1 megabyte :
$ bfg --strip-blobs-bigger-than 1M my-repo.git
Replace all passwords listed in a file (prefix lines 'regex:' or 'glob:' if required) with ***REMOVED*** wherever they occur in your repository :
$ bfg --replace-text passwords.txt my-repo.git

Tags

Internal References

External References

Article Type

General