I have a git repository where the .git folder is 7 MB . Then I added and committed the .exe file with 16 MB , and then:
git gc --aggressive && git prune
After the above .git folder is now 23 MB .
Next, I did git rebase -i and selected drop:

on the commit ( c8185ff ) that provided the 16 megabyte file, I completed the reboot and ran again:
git gc --aggressive && git prune
Now that I am measuring the .git folder, it is still 23 MB .
If you run git rebase above, do not delete the commit completely from the history - as if the file had never been entered - and therefore return the .git folder to 7 MB ?
I also tried to make a new repository clone and the size is still 23 MB . I assume that the reflog will be cleared when a new clone is created.
source share