How to cleanup garbage in remote git repo
问题 I recently ran into a size limit with my Bitbucket repo. I followed the countless other questions answering how to clean up your git repo and ended up using BFG to remove some bad commits. This worked great, however, I noticed that after running a git count, there was a large amount of space sitting in garbage. So I ran a simple git gc. However, that did nothing to clean up the garbage. After some digging I found the following command: git -c gc.reflogExpire=0 -c gc.reflogExpireUnreachable=0