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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Reduce Repo size

Hello,

I have a problem with my repo. My repository has grown more in size after I trie the BFG Method and it grew even bigger (1.85 GB). A manual git gc would be helpful. I fear if I try this Method again that my repo will go over the 2 GB and wont except my git commands.

2 answers

1 accepted

0 votes
Answer accepted

Hi Karim,

You are right that when you rewrite history and push to the Bitbucket repo, a git gc is needed on the remote repo for the old references to get removed and for the repo's size to get reduced.

I checked your Bitbucket Cloud account in our system, I found which repo from the ones you have access to has a size of 1.8 GB, and I ran a git gc on it. Its size is now 197.2 MB.

Please feel free to let me know if things are ok now and if you have any further questions.

Kind regards,
Theodora

Hi,

thanks for the git gc! This is the second time this happend to my repository. I'm not sure if this is an error from my side or from GitBash/repository. Is there a way to verify it?

Hi Karim,

You are very welcome!

If the repo size increased after a push that included history rewrite, this is expected. In this case, the remote repo contains both old references (prior to history rewrite) and the new ones, which is why its size gets increased. A git gc is needed on the remote repo for the old refs to get removed and for the repo's size to get reduced.

I'm not sure if you also rewrote history and pushed the first time that the increase in size happened?

Another possible reason for the increase in size might be a bug we have, where the garbage file in the repo is sometimes counted in the repo size:

However, since the issue is no longer occurring now, I'm afraid it's hard to say what was the case the first time this occurred.

Kind regards,
Theodora

Have you deleted files from you repo? If so you'll have to purge the files from the history to reduce the size.

Atlassian has a guide here to reduce the size of the repo.

https://support.atlassian.com/bitbucket-cloud/docs/reduce-repository-size/

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,826 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you