This solution is a combination of two sources
- http://naleid.com/blog/2012/01/17/finding-and-purging-big-files-from-git-history
- http://stackoverflow.com/questions/24693360/git-large-pack-file-delete-and-rewrite
First, create list of all files tracked in the repository
git rev-list --objects --all | sort -k 2 > allfileshas.txt
Get the SHA for all committed files and sort them from biggest to smallest