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.
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.
Hi @Theodora Boudale , thanks
Great, I managed to push now.
To print local size I use:
git count-objects -vH
$ git count-objects -vH
size: 0 bytes
size-pack: 1.11 GiB
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.
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.
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...
Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...
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