Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to push cleaned repo – workspace in read-only mode even after reducing repo size with BFG

BrijeshJaiswal July 7, 2025

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!

1 answer

1 accepted

2 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 7, 2025

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

BrijeshJaiswal July 7, 2025

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

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 7, 2025

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.

Next steps:

  • The workspace admin/owner can temporarily upgrade the billing plan of the workspace to a paid one, so that write access is restored. You will then be able to push your changes. We provide a 30-day evaluation for the Standard and Premium plan and we only charge at the end of this period. If the admin downgrades to the Free plan before the 30-day evaluation period is over, we won't charge them.

  • This workspace has other repos that you don't have access to, and those contribute to the workspace storage. Reducing the size only of this repo you posted about, will not be enough to bring the total workspace storage down to less than 1 GB. Action will need to be taken for the other large repos in the workspace that you don't have access to.

Kind regards,
Theodora

Like BrijeshJaiswal likes this
BrijeshJaiswal July 7, 2025

Hi,

Thank you so much for your support in reducing the repo size! Really appreciate your help

BrijeshJaiswal August 4, 2025
BrijeshJaiswal August 4, 2025

@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.

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 4, 2025

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

BrijeshJaiswal August 4, 2025

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

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 4, 2025

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

BrijeshJaiswal August 4, 2025

Hi @Theodora Boudale Can you please ran git gc?

Thanks
Brijesh

BrijeshJaiswal August 4, 2025

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

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 5, 2025

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

BrijeshJaiswal August 5, 2025
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 5, 2025

You are very welcome. Please feel free to reach out if you ever need anything else!

BrijeshJaiswal August 5, 2025
Like Theodora Boudale likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events