I'd take care of this myself, but Bitbucket seems to have no way of doing so or of contacting support.
I've tried the trick of doing a commit and then resetting to HEAD~1 and doing a force push, but that doesn't work. I even tried pushing the size of my repo up over 3 GB, and then when I did that process, it finally seemed to have kicked in and dropped a little bit from 3.5 GB down to 2.9 GB, but that's still way too large.
On my local file system, with everything pruned and packed, the repo is under 5 MB:
count: 0
size: 0 bytes
in-pack: 13324
packs: 1
size-pack: 4.71 MiB
prune-packable: 0
garbage: 0
size-garbage: 0 bytes
But because some developer long ago accidentally committed a video file years ago before I was on this project, I can't get the repo size down, even though I've already modified the history to remove that commit retroactively.
It is ridiculous that there's not a button under the Repository Details tab to force a git gc! It doesn't even seem to be doing periodic garbage collection for maintenance, because I removed that file in July of 2023 when I first started contributing to this project.
Until we got the 1 GB warning email, it didn't even matter, but there's got to be a better way to handle that.
Is there any way to get a follow up on why that repo is still so big? The only other thing I can think to try is deleting the repo and reuploading the clone from scratch.
Hi Jonathan,
Apologies for the delay!
I ran garbage collection again on the repository, and the size remains unchanged. Since you cloned the repository, the size is significantly smaller than what's reported remotely. I believe that object preservation, which maintains objects on the server side of pull requests and aids in calculating pull request diffs, might be causing the repository size to be inflated - (Improving performance on complex diffs).
Typically, a way to further reduce the size is to delete the pull requests that preserve objects in the repository. However, given the large number of pull requests, this option isn't ideal. As you suggested, an alternative would be to create a new empty remote repository with the same name and then push the contents of the local repository to it.
- Phil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Phil C, that's it! I didn't even think about pull requests because we aren't using them now. Is there any way to wipe out all of the pull requests and then do the GC again? I can't find a way in the UI to delete them.
If not, I guess I'll just have to go with the delete repo option and push the clone back to a fresh one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jonathan,
There are a lot of pull requests. Therefore deleting them is not ideal. It'll be quicker to clone the repository and push it to a fresh remote repository.
- Phil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jonathan,
Welcome to the community!
I reviewed the repositories you have access to and found one that exceeds 1 GB in size.
I've run garbage collection on the repository, the repository size has decreased. Is the current size of the remote repository now comparable to the local repository size? To verify, you can execute the following command in the local repository:
You can check by running the following command on the local repository:
git count-objects -vH
The "size-pack" will display the local repository size.
Before making the next push to the remote repository, please ensure that you and all collaborators create a fresh clone of the remote repository to prevent reintroducing old or cleaned-up history, which could lead to increasing the repository size again.
- Phil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Phil. I see that the size did decrease on Bitbucket, but it still shows that it is 684.54 MB via the web UI.
However, when I run count-objects on a fresh clone, it tells me it's 5.29 MiB:
count: 0
size: 0 bytes
in-pack: 13324
packs: 1
size-pack: 5.29 MiB
prune-packable: 0
garbage: 0
size-garbage: 0 bytes
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 @Jonathan Duke,
Welcome to Atlassian Community!
I have notified the Atlassian support team that is on here and they will reach out to you within 2 business days regarding this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.