Skip to content

Instantly share code, notes, and snippets.

@EarthmanWeb
Created September 5, 2022 10:52
Show Gist options
  • Save EarthmanWeb/d29174ad7712fc4caddbad4dae434f7b to your computer and use it in GitHub Desktop.
Save EarthmanWeb/d29174ad7712fc4caddbad4dae434f7b to your computer and use it in GitHub Desktop.
git filter-branch --tree-filter "rm -rf ai1wm-backups" --prune-empty HEAD
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d
echo ai1wm-backups/ >> .gitignore
git add .gitignore
git commit -m 'Removing ai1wm-backups from git history'
git gc
git push origin production --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment