How to cleanup garbage in remote git repo

后端 未结 2 1971
日久生厌
日久生厌 2020-11-30 04:02

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 so

2条回答
  •  失恋的感觉
    2020-11-30 04:31

    If anyone else is experiencing this, the answer turned out to be yes.

    Bitbucket support ran the following:

    git reflog expire --expire="1 hour" --all
    git reflog expire --expire-unreachable="1 hour" --all
    git prune --expire="1 hour" -v
    git gc --aggressive --prune="1 hour"
    

    The before and after reduced the remote repo size from over 2GB, to under 1GB.

提交回复
热议问题