Hi team,
I’m running into an issue when trying to push to my Bitbucket repository. I receive the following error message:
This workspace is over the 1 GB size limit. Reduce the size of your workspace or upgrade to a Standard or Premium plan to increase the size limit.
To address this, I deleted the folder that was mistakenly committed on 15th July (it was approximately 1 GB in size). However, even after removing it from the working directory and staging area, I still get the same error when attempting to push new changes.
I’ve realized that just deleting the folder and committing doesn’t remove it from the repository history. What I would like to do is completely remove the last commit from 15th July, which added that large folder, so the workspace goes back under the storage limit.
Could you please help me clean up the repository on your end to clear out the dangling commits and reclaim the space?
Let me know if there's anything else needed from my side.
Thank you!
Best regards,
Ahmad
Hi Ahmad and welcome to the community!
I ran a git gc on the repo that you have access to. Please keep in mind that I can only run a git gc for repos you have access to. If a git gc is needed for other repos of this workspace, we need the request to come from a user with access to these repos.
The repo's size has been reduced and the workspace now consumes less than 1 GB of storage, which means you should be able to write to the repo.
Please keep in mind that a git gc cannot remove files that are part of the repo's history.
If you'd like to remove a certain folder from the history, you can use a tool like BFG repo cleaner. You can check this reply of mine to a different question for more details:
If you have any questions about the info I provided there, please feel free to let me know.
If you rewrite history in the repo with BFG and push your changes, the repo size may go up again and it will need another git gc. You can leave a comment there, and I can run it again for this repo.
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.