How do we reduce the size of our repo? Filtered branches, done local clean ups, but never seems to make a difference in Repository details. How often is GC done on bitbuckets end? Is there a way to trigger it.
Hello @Brett ,
and welcome to the Community!
GC is executed from time to time based on some repository heuristics that calculate parameters such as loose objects.
I went ahead and triggered a manual GC on the biggest repository I found under the workspace you provided when posting this question. This helped to reduce ~500MB of its original size.
If you would like to reduce the size of that repository further, follow the instructions in the article Reduce Repository Size | Bitbucket Cloud.
I hope that helps! Let us know in case you have any questions.
Thank you, @Brett !
Patrik S
Hey Patrik,
Thank you for that. My repo is still sitting at around 1.3gb according to Repository details, yet local is only 13MB. Do you have any insight into this difference?
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Brett
Could you confirm if after cloning the repository locally and running the command below, the large files are no longer listed ?
git rev-list --objects --all \
| git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \
| sed -n 's/^blob //p' \
| sort --numeric-sort --key=2 \
| tail -n 30 \
| cut -c 1-12,41- \
| $(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7
This should list the top 30 largest files in the repository.
If there are still large files being listed, I'd recommend using BFG tool to remove those files and then we can execute GC again on the server side.
However, if no large files are present in the output, some pull requests in that repository might still be holding the large files. If that is the case, I can raise a support ticket for you to investigate further.
Thank you, @Brett !
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.