Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

My Bitbucket cloud size is different than my local repo

Kia Davari May 3, 2022

Hi there, I have pushed a large folder to my bitbucket last week so it reached over 4GB. after reading this link https://support.atlassian.com/bitbucket-cloud/docs/reduce-repository-size/ I was able to undo the last push. After that, I pushed another large folder accidentally and the repo size got ~2GB. Once I realized it, I deleted that large folder, deleted its branch, and everything related to that. However, after lots of effort bitbucket repo still shows 2GB. I also tried to rewrite history using BFG to see if it helps reduce the size of the repo but it didn't work either and my local repo size is much less than my bitbucket cloud.

Could you help me with that? Will `git gc` also help my case?
Thanks

2 answers

1 accepted

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 4, 2022

Hi @Kia Davari and welcome to the community.

I found the repo that was over 2 GB, I ran a git gc on it, and its size is 188.3 KB now.

Does this agree with the size of your local repo?

I'm afraid that users cannot run a garbage collection on remote repos at the moment. We have a feature request for that in our issue tracker that you can vote for and add yourself as a watcher if you'd like to get notified on updates:

Kind regards,
Theodora

Kia Davari May 4, 2022

Hi Theodora,
Thank you so much. I've been struggling with this issue for 2 days and did everything to rewrite the history but none of them worked. Should I reach out to you again if it happens again? is there any way that I can clear the history?
BTW, not sure the repo size now is the same as what you see (188.3 KB). I just cloned the repo and the `size-pack` of `git count-objects -v` is 97.09 KB. is that right?

Thanks again,

Kia

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 6, 2022

Hi Kia,

You are very welcome!

The automated garbage collection will get triggered if the repo size is over the 4 GB limit and you undo the last push, as per our documentation.

It will not get triggered if the repo size is below the 4 GB limit, or if it is over the limit but you perform any action other than git reset.

If you delete a branch with large files or rewrite history with BFG, you will need to contact us to run a git gc on the repo. You can either post a question in community or create a support ticket if the repo belongs to a workspace on a paid billing plan. 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.

If the repo has multiple branches then the difference in `git count-objects -v` is expected, as when you clone a repo, the main branch is pulled only.

Kind regards,
Theodora

Like Kia Davari likes this
0 votes
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 3, 2022

Hi @Kia Davari,

Welcome to Atlassian Community!

I have notified the Atlassian support team that is on community and they should be able to help you. 

Kia Davari May 4, 2022

Hi, Mikael. yes, they are doing so. Thank you so much

Like Mikael Sandberg likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events