One of the repositories I'm working on has less than 100 MB in files, but the BitBucket Repository says it has 2GB of space used. Maybe garbage collection will solve this problem.
Would it be possible to run garbage collection on the repository e*****-*re ?
Hi Thiago and welcome to the community!
The Bitbucket Cloud account with the same email address as your community account does not have access to any workspaces or repos.
I assume that you have another Bitbucket account with a different email address that has access to that repo? Can you please log in to https://community.atlassian.com/ with the email address of that account and then leave a reply below my answer? I will then be able to see the email of that account and check the repositories it has access to.
Just a heads up, I edited the repo name from your post for privacy reasons.
Kind regards,
Theodora
Thanks for reply, now i logged with the correct email address.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, Thiago.
I ran a git gc on the repo but its size hasn't been reduced significantly, it's at 1.9 GB now.
Can you please try the following:
Get a mirror clone of the repo with the command
git clone -mirror repo_url
Then, navigate to the directory of the mirror clone, and run
git count-objects -Hv
What output do you get from that command?
If the sum of size and size-pack in the output is significantly less than 1.9 GB, then it is possible that PR refs contribute to the repo's size in Bitbucket. We'll need a support ticket to check that and see how to resolve it; you can create a ticket via https://support.atlassian.com/contact/#/, in "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product. When you are asked to provide the workspace URL, please make sure you enter the URL of the workspace that is on a paid billing plan to proceed with ticket creation.
If the sum of size and size-pack in the output is around 1.9 GB then PR refs are not an issue (since they are not cloned) and the size has to do with the files and history in the repo.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Theodora Boudale !
The size pack was arount 1.9GB and I just used the BFG tool to remove some large files, can you run gc on the repo again?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thiago,
Of course. I ran another git gc but the repo's size is still 1.9 GB.
Does a new mirror clone show a smaller size if you run git count-objects -Hv in it?
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes now show just 138.21 Mib
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then I think it may be due to PR refs. Files you removed with BFG may still be referenced by PRs and contribute to repository size.
Please create a support ticket via the link I shared in my earlier reply and one of my colleagues will look into it (I cannot check PR refs without a support ticket).
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.