https://rtyley.github.io/bfg-repo-cleaner/

The BFG Repo-Cleaner is a tool that's built and maintained by the open source community. It provides a faster, simpler alternative to git filter-repo for removing unwanted data.

Removes large or troublesome blobs like git-filter-branch does, but faster. And written in Scala

Recommended by GitHub to remove sensitive data from a repository.

setup

mkdir -p $HOME/.local/share/bfg
cd !$  # cd $HOME/.local/share/bfg 
wget https://repo1.maven.org/maven2/com/madgag/bfg/1.14.0/bfg-1.14.0.jar
ln -s  bfg-1.14.0.jar bfg.jar

Create Alias: alias bfg="java -jar ~/.local/share/bfg/bfg.jar"

usage

mkdir repo_cleaning_dir
cd repo_cleaning_dir
git clone --mirror git@github.com:uaf-t3/t3x.git
cd t3x.git
bfg --delete-files *changePassword.sh
# verify it worked and says so
git reflog expire --expire=now --all && git gc --prune=now --aggressive
git push --force
# ok ... go back to normal t3x repo
git checkout main
git pull