When I tried to do a commit today I received the message saying that my workspace is over the 1GB limit. Locally, I can see that it nothing like that in size.
I have read several recent posts all with the same issue. The general consensus is that garbage collection needs to run on the repository but there doesn't appear to be any way for users to do that against the remote repo.
How are we supposed to reduce the size of the repository so that we return below our limit?
For all those who find themselves in the same situation and come across this post, here's how you can fix it:
First up, download/install a couple of tools:
1) Antony Stubbs created a script that shows you large files in your repo. Download it here.
2) I found this on the Atlassian site but using git filter-branch is not recommended and you should install git-filter-repo
Once you have these, do the following:
1) Make two fresh clones of your repository. One to work on and the other to keep as a backup.
2) Run du -hs .git/objects inside one of your clones. This will tell you the starting size of the repo.
3) Run ./git_find_big.sh to get a list of the largest files in your repo that you might want to remove.
4) Choose a file and run git filter-repo --invert-paths --path <your filepath> - this will untrack the file from your repo and remove it from the commit history.
5) Repeat step 4 for each large file that you can remove.
6) Repeat step 3 onwards until you have removed as many large files as you can safely remove.
7) Running step 2 again should show a much smaller repo.
Now the fun part. Unfortunately instead of simply blocking the commit which puts your repo into read-only mode, Atlassian chose to allow the commit and go read-only straight away.
In order to update your repo WITHOUT creating a trial subscription is to
1) Delete your existing repository in BitBucket.
2) Create a new repository in BitBucket with the same name as the deleted one.
3) Make sure your remotes are correctly set and then git push --all --force and git push --tags --force to push your newly downsized repository to BitBucket.
I hope this helps someone.
Hi @Alan Rutter,
Welcome to the Bitbucket Cloud community!
Earlier this year, we provided an update regarding the Free plan through a blog post and email. These updates involve a 1GB limitation on workspace sizes. More details can be found here - Important changes coming to Bitbucket Cloud’s free plan.
Your current workspace includes two repositories totaling 1.3 GB, with one repository at 1.3 GB and the other being negligible. The larger repository exceeds the 1 GB limit for free workspaces. Although I've run garbage collection on this repository, its size remains unchanged. While garbage collection can offer a short-term solution, as you continue to work on these repositories and potentially add more, the overall size could further exceed the limit.
To address this issue, you have two options:
Option 1:
Option 2:
As long as the total size of all your repositories remains under 1 GB, you will be able to push changes again.
I hope this information is useful.
- Phil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Phil,
On behalf of all the other people who have asked the same question in the last few days, this cut and pasted stock reply (which I have seen you post multiple times) doesn’t answer the question at all and is quite frankly insulting to those of us in the community.
Firstly, if Atlassian is implementing this size policy, then as users, we need the ability to run garbage collection on our repos without asking support.
Secondly, I have looked at my repository and it really isn’t that big so what is taking up the space.
Instead of your condescending reply, why not try to actually be helpful and provide the tools and information necessary for me to be able to find out why my repo is apparently so large. In addition, how am I supposed to reduce the size of this repo if I can’t push anything to it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.