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

Reduced Repo Size, Local repo size <500 MB but on Bitbucket it shows 3.2 GB

santpal April 18, 2023

I tried to clean up my repository and reduce the size since I was getting 2GB warning. I deleted a big size folder from history and repository. My local repository size is now 439M but on Bitbucket cloud the repo size increased to ~3.2 GB. I tried git gc and it didn't help. Any ideas how to reduce the size of repository on bitbucket.

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.
April 19, 2023

Hi @santpal and welcome to the community!

If you rewrite history and push to the remote, it is expected that its size will go up, because the remote repo will contain both old references (prior to history rewrite) and new ones (after history rewrite). A git gc is needed on the remote repo to remove any old references. While end users can run a git gc on their local repo, it is not possible for them to trigger a git gc on the remote repo.

I checked the repos your account has access to, I found the one with a size of 3.2 GB and I ran a git gc on it. Its size has been reduced, please feel free to let me know if it looks ok on your end.

We have a feature request for allowing users to trigger a git gc on their remote repos:

In the meantime, if you ever rewrite history again and would like a git gc for your remote repo, you can create a question in community and a member of the support team can do it.

Kind regards,
Theodora

santpal April 19, 2023

Yes, I see the size is reduced. Thanks got it

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 19, 2023

Thank you for the update and you are very welcome!

Please feel free to reach out if you ever need anything else.

Kind regards,
Theodora

0 votes
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 18, 2023

Hi @santpal  and welcome,

probably you local repo has not all the history. Btw, in order to reduce repo size, please take a look to the following article https://support.atlassian.com/bitbucket-cloud/docs/reduce-repository-size/

Hope this helps,

Fabio

santpal April 18, 2023

Hi Fabio,

I followed the link above. The issue is that I removed file/folders from repo to reduce the size of the repo - The size reduced on the local repo but on bitbucket the size increased to even more than before giving me 2GB warning again. I don't see any dangling commit either. Rewind history will lead me to files and folders that I didn't want in the first place.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events