Hi Bitbucket Community,
I’m facing an issue where my Bitbucket Cloud workspace has been locked in read-only mode because it exceeded the 1 GB limit.
To resolve this, I cloned the repo with `--mirror`, used BFG to strip large files over 100MB, ran aggressive GC, and reduced my local repo size significantly.
However, when I try to push the cleaned mirror back to Bitbucket, I still get this error:
Thank you in advance!
Hi @BrijeshJaiswal and welcome to the community!
Your workspace has access to multiple workspaces. I can trigger a garbage collection for the remote repos, this may help bring the total workspace storage down. I don't know if it will be enough to bring the workspace's storage below 1 GB, but it's something we can try. If you'd like me to do that, please let me know the last two letters of the workspace ID. You can find the workspace ID in the URL on your browser. For example, if the URL of the repo is https://bitbucket.org/workspace-id/repo/src/master/, then workspace-id in the URL is the ID of the workspace. Please also keep in mind that I can only trigger the garbage collection for repos that your account has access to.
Kind regards,
Theodora
Hi Atlassian team,
Thanks for your help so far!
Please trigger a garbage collection for my Bitbucket workspace.
- Workspace ID: (last two letters: "in")
- Repository: <redacted>
Thanks again!
— Brijesh Jaiswal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thank you for the details. Just a heads up, I removed the repo name from your post to protect your privacy.
I ran a git gc on the repo. Its size has been reduced but it's still larger than the limit, it's at 2.3 GB.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thank you so much for your support in reducing the repo size! Really appreciate your help
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.
@Theodora Boudale Can you please run git gc on the repo?
i've made some changes recently to reduce the repo size but the .git folder is still large.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @BrijeshJaiswal,
I ran a git gc on the repo. Its size has reduced, but it is still over 1 GB, at 1.3 GB.
If you'd like to reduce the repo size further, I recommend checking if there are any more large files in the repo that you can remove (by rewriting history).
You can check this reply of mine to another post with more details, including what command to use to check for large files in the repo:
If you reduce the repo size further, you can request another git gc here.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Theodora Boudale,
After running git gc , the repo size is still large. i notice this file is taking 1.3 GB
1.3G ./.git/objects/pack/pack-de6c7dc6cc3cf96af7b3d1622f16397d588d98a0.pack
Can this be safly deleted from your side , or is it still required by the repo history?
Please confirm if it;s safe to remove or if you can help clean it further.
Thanks,
Brijesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Brijesh,
The pack file is where the history is stored, without it there is no repo and deleting it would cause corruption and the history would be lost.
The way to go here if you want to reduce the size further is to identify other large files that are not needed, and remove them from history (see my previous reply).
Kind regards,
Theodora
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.
Hi @Theodora Boudale I have removed some large files from the repo history, Could you please run git gc on the repo again to clean up the storage?
Kind regards,
Brijesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Brijesh,
I ran another git gc on the repo and its size has been reduced significantly. It is 27.0 MB now.
Please feel free to let me know if you need anything else.
Kind regards,
Theodora
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 are very welcome. Please feel free to reach out if you ever need anything else!
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.