Git BFG (removal tool)

?
R
Bash

Git BFG is a powerful tool for cleaning Git repositories, efficiently removing large files, sensitive data, or unwanted history. It's faster and simpler than git-filter-branch, making it ideal for purging confidential information or reducing repository size without complex commands. Essential for maintaining lean, secure Git projects.

1# Download BFG
2https://repo1.maven.org/maven2/com/madgag/bfg/1.13.0/bfg-1.13.0.jar
3
4# Run BFG
5java -jar bfg.jar --delete-files default.backup .gi
6
7# Reflog
8git reflog expire --expire=now --all && git gc --prune=now --aggressive

Created on 4/5/2019