request to run gc on my repository

Gursimar Singh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 15, 2023

Please run garbacge collector on my repo:  

https://bitbucket.org/<workspaceID>/<reposlug>

I have enabled the feature from labs but still the size of the repo has not been reduced.

1 answer

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 18, 2023

G'day Gursimar!

Thank you for contacting Bitbucket Cloud Support.

I have executed a gc and it has reduced the repository by 300mb.

If you would like to reduce the size further, I would suggest executing the following command first to find your largest files and keep note of their extension:

git rev-list --objects --all \
| git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \
| awk '/^blob/ {print substr($0,6)}' \
| sort -r --numeric-sort --key=2 \
| numfmt --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest

 Once you have found these large files, we have a guide for either removing these or converting them to GIT LFS storage using the BFG tool:

The reason for making use of GIT LFS with the BFG Tool is that whenever you store larger files in your repository, the full size of these files are added each time to all subsequent commits. Converting files to GIT LFS will change these files in your repository commit history to pointer objects which will reference these files in GIT LFS storage rather than storing them each time in your commit

NOTE: I have removed your workspaceID/repository slug from your question as this is a public forum.

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events