Remove file from git history keeping historical changes.
See details at https://rtyley.github.io/bfg-repo-cleaner.
- download bfg: https://repo1.maven.org/maven2/com/madgag/bfg/1.14.0/bfg-1.14.0.jar
- install java jre
- clone repo
- remove files (not physically)
- move into repo directory
- strip out unwanted history
- push changes
/bin/bash remove-files-from-git-history.sh ACCOUNT REPOSITORY FILE