Hello!
I ran BFG Repo cleaner, following the directions here. This successfully reduced the size of my repository (based on fresh `git clone` and `git clone --mirror`) by several hundred megabytes. However, the Bitbucket workspace and Bitbucket Repository size has not decreased, even after several more pushes and waiting for 30 days.
I see other forum posts here that Bitbucket Support can run garbage collection on their end to reduce the size of my repository. Could somebody please help with that? My workspace is https://bitbucket.org/Dumpis/, and the repository is named custom-hobo.
Thank you!
Hi @Tom Wiseman ,
Unfortunately, Bitbucket doesn't auto-garbage-collect dangling objects immediately after history rewrites. The 30-day wait is for local reflog expiry, and pushes alone won't trigger it unless you're over the 2GB warning threshold. :)
But as a product admin, you can try self-triggering auto-GC first (no support ticket needed):
1. Force a Size-Triggering Push: In your cleaned mirror repo, run git reset --hard HEAD~1 (creates a dangling commit), then git push --force to main/master. This mimics an "undo last push," prompting Bitbucket to auto-run full GC (garbage collect) within minutes. Refer to this Git article / Reduce repo size.
2. Check Size: Refresh the repo settings—should drop to match your local clone. If not, run git reflog expire --expire=now --all && git gc --prune=now --aggressive locally, push again, and retry the reset/push.
3. PR Cleanup Check: If GC still skips, old pull requests might be holding refs to large blobs. Use this Python script (from Atlassian KB) to list recent PRs, close/delete them, then re-push. You can refer to this article.
If this doesn't work out, reach out to Bitbucket Support for a manual GC on custom-hobo. As admin, log in at support.atlassian.com/contact > Select Bitbucket Cloud > "Repository size/management" > Provide the workspace/repo URL and your BFG logs.
Hope everything works out for you.
Best,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.