I have git repo with android app and It looks like one of developers didn't gitignore correctly so .apk files were committed and repo became huge (repo is ~300Mb, app size is ~30Mb).
I deleted some garbage:
git filter-branch --index-filter 'git rm --cached --ignore-unmatch ./app/release/app-release.apk' --tag-name-filter cat -- --all
git filter-branch --index-filter 'git rm --cached --ignore-unmatch ./app/build/outputs/apk/debug/app-debug.apk' --tag-name-filter cat -- --all
Repo size became smaller, it's 200Mb now, but when I'm searching for big commits:
git verify-pack -v .git/objects/pack/pack-*.idx | sort -k 3 -n | tail -20
I still see commits which contain .apk files, but I can't even checkout those commits:
So the question is how can I shrink that pack file?