I am handling a project in Magento, and my project is in bit-bucket repository. I have a large amount of unused files in my .git/object folder.
du -a -h myproject/.git/objects | sort -n -r | head -n 100
It displays like
769M myproject/.git/objects/pack/pack-e8ca98308b512b34aaf887c85e1f1b7414a65e90.pack
760K myproject/.git/objects/54
737M myproject/.git/objects/pack/tmp_pack_ba3Zw1
732K myproject/.git/objects/pack/pack-e6fb69581vb652c624823f24f455248b3cf6805b.pack
I don't have any files in my directory now with such large amount. Earlier by mistake one zip was pushed in master branch and now I have removed that zip from git as well as from my local repo.
I want to remove this entry since it increased my git repo as 1.2 GB.
I have done some research about git -gc and git -prune. Not sure if it affect my vcs history or any commits or else in my repo.
How can I remove this large data entry in .git/object directory?