I'm trying to reduce the size of a repository I have hosted on GitHub.
Previously, I had a web app in there that I moved to a separate repo with a filter-branch. So,there are a bunch of objects in there that I can clean up.
This is what I tried so far.
Found the objects in .git
directory that are taking most space
git verify-pack -v .git/objects/pack/pack-69f30fd80611b43114487a13bd0acce8ca591d65.idx | sort -k 3 -n | tail -10
Looked up what those objects where
git rev-list --objects --all | grep 791b9d08eca70
791b9d08eca70f4070bee37e0f8743172d6218c5 static/js/main.d4d0a6ad.js.map
I don't need these.
So, I did a git prune
git gc --aggressive --prune=now
I see that the size had gone down from 180 MB to 56 MB.
Now I want the remote in GitHub to reflect the same but I'm not sure how to push these changes there. I don't see any changes if I do git status
.
I tried
git push --all --force
Everything up-to-date
That doesn't change anything either.