Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Why is remote repository size increasing after force push? Edited

Hi there,

I am currently on a mission of cleaning up our repo, which has grown over the past 7 years to over 10 gb. I am migrating files to git lfs, use bfg repo cleaner and git-filter-repo to clean up. I set up a new repo where i only pushed one branch of the old repository and step by step do force pushes that clean up more things from history.

What I expect: a force push of a smaller repo size should also decrease the size on the remote, so that the bitbucket UI's "Retrieve size" should show approximately the same size.

What actually happens: after every force push, the respository size increases, sometimes by 500 mb sometimes by 3gb. The remote already shows a size of 7gb again even though a fresh checkout and my local copy both show sizes under 3gb.

In short: my local repository keeps decreasing in size but the remote keeps increasing.

What is going wrong? Do I have to run a git gc on the remote? is that even possible & recommended?


Any help and insights appreciated :)

1 answer

0 votes
Tyler T Atlassian Team Mar 02, 2020

If you are working with Bitbucket Server, the instance should take care of garbage collection automatically. You can trigger garbage collection manually using the directions found here:

If you continue to have issues, please contact support.

Hi @Tyler T , thanks a lot for the response! We triggered "git repack -Adln" but omitted the keep-unreachable flag though as its not available on the ancient git version that our bitbucket server is currently on (2.9) (Our repository is at this point only used for testing so it felt safe to omit that flag)

This reduced the repo size from 7.6GB to 1.5GB! thats a lot! Now i am wondering why the server did not trigger any garbage collection automatically? How can we ensure that the issue is not reappearing? We are on Version "Atlassian Bitbucket v5.0.10"

Would be great to get some further insights

Like Tyler T likes this
Tyler T Atlassian Team Mar 04, 2020

It might be most helpful to have our support team look at your specific instance to identify why it is not happening automatically. You can open a support ticket here:

Suggest an answer

Log in or Sign up to answer
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...

266 views 2 10
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