Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Repo size exceeds 4GB, cant push fixes


I was recently at 3.2GB on my repo and attempted to do some cleaning up to avoid running into the 4GB limit. But doing so somehow resulted in the repo going up to 4.7GB instead of down to 1.5GB which I have locally...

I tried fixing it with BFG, but I can't push those fixes because the repo is beyond 4GB, so it is stuck and there is now nothing I can do.

Please help.

3 answers

1 accepted

1 vote
Answer accepted

For future googlers:

Support had to fix this on their end by running some GC on the bitbucket remote, there was nothing I could do, but they were fast so that's good.

Thank you, I faced the same issue.  For some reason, the BFG cleanup works very well, but a manual GC is needed on Bitbucket cloud to show to the new real size.
Open a ticket, they will take care of this for you !

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jan 04, 2022

Hi @kelkk and welcome to the community.

Your Bitbucket Cloud account with the same email as your community account owns one repo over 4 GB. I ran a git gc for this repo, but its size has not been reduced.

Since you have reduced the size of your repo locally with BFG, I temporarily increased the repo size limit to 6.5 GB so you can push your changes.

Please note that when you push your changes, another git gc will be needed on the remote repo, for the repo's size to decrease. Feel free to leave a comment here to let me know that you have pushed, and I can run another git gc for your repo.

Kind regards,

Hi @Theodora Boudale , thanks

Great, I managed to push now.

To print local size I use:

git gc
git count-objects -vH

Output is:

$ git count-objects -vH
+count: 0
size: 0 bytes
in-pack: 5366
packs: 1
size-pack: 1.11 GiB
prune-packable: 0
garbage: 0
size-garbage: 0 bytes

If you agree that this is an accurate way of measuring a git repo size, it should consume just 1.11GiB as it is now.

It says 5.8GB on bitbucket though, but let's see what happens if you run another gc then.

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

Hi @kelkk

Thank you for the update.

I ran another git gc for your repo, but its size remains unchanged.

I have created a ticket for this issue with Bitbucket Cloud support team, you should have received an email with a link to the ticket. (In case you haven't, please feel free to let me know, I can post the ticket URL here, only you and Atlassian staff will be able to view its content).

The engineer that will work on your ticket will provide an update there.

If you have any questions, please feel free to let me know.

Kind regards,

0 votes
Kurt Klinner
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jan 03, 2022



Welcome to the Atlassian community

Have you had already a look to



Hi Kurt, thanks,

Yes, but that page only suggests to reverse the last commit if above 4GB, but that only works if the problem is a large last commit. In this case the last registered commit was a few days ago and only caused the repo to be at 3.2GB.
The problem here is that I attempted to remove a file from history to reduce the repo size below 2GB, but that somehow caused the remote repo on bitbucket to grow beyond 4GB even though it takes 1.5GB locally... Probably due to storing garbage remotely, but garbage collection on the bitbucket remote doesn't seem to work either, I tried that function as well. I also tried the hack to trigger remote gc by creating and deleting a branch on bitbucket, but it triggered no change.

My first attempt was with filter-branch, and I tried to do a more proper cleanup a second time by using BFG, but i can't push those changes due to the 4GB limit...

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events