Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Repository keeps growning despite removing larger files from commit history

My repository reported a size over 2GB and I started to remove larger files from the commit history by using the suggested BFG tool.

The tool reported a successful run and the repository seems to be significantly smaller locally. But whenever I try to trigger the remote garbage collection the repository seems to grow rather than shrinking in size.

I tried several different methods (from the atlassion post and from SO) but nothing seems to be working.

1 answer

1 accepted

0 votes
Answer accepted
Caroline R Atlassian Team Nov 08, 2021

Hi, @fasc8

Thank you for reaching out to Atlassian Community!

I ran the GC against your repository that was above 2 GB and was able to reduce its size to 235.6 MB. 

Just to give you some context around this behavior, after you push the changes with BFG, the remote repository still has the old references as well. So the GC is required on the remote repository to clean up any old references you have removed. 

We have a feature request to allow users to mark repositories for git GC, as you can check here:

Please consider adding yourself as a watcher to receive the updates as we make progress with this. If you are not familiar with our Feature Request Policy, you can read more about it here.

Feel free to share any additional questions or concerns regarding this case.

Kind regards,

Thank you. You ran the garbage collection for the right repository. It is now significantly smaller.

And I took a look at the feature request and added my vote to it.

Caroline R Atlassian Team Nov 12, 2021

Hi, @fasc8! Thanks for your confirmation, I'm glad to help. 

Kind regards,

Suggest an answer

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

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,255 views 2 9
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