At what intervals does Bitbucket run automatic garbage collection? Our workspace shows 1.25GB of used storage, even though I removed large files from the repository yesterday. However, the storage usage in the repository details remains unchanged. Could you please run garbage collection manually on our workspace?
Hi Amit and welcome to the community!
A garbage collection runs on every push but with different parameters every time depending on many different conditions. If the automated git gc doesn't clean up your repo, you can always create a question in community and ask that we run it manually for your repo.
Can you please let me know, which repository or repositories did you remove large files from and you would like us to run a git gc for? Please don't post URLs, as this is a public forum. You can just provide the repo name(s) masked, e.g. something like this re*****s***y, so I can identify them among the ones you have access to and run a git gc for them.
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.
Thank you, Amit. I ran a git gc on this repo but its size hasn't been reduced a lot.
It's possible that some of the files you removed from the history may still be referenced in the repo's Pull Requests.
Could you please follow the steps below and provide the info I mention below, to confirm if that is the case?
1. Take a mirror clone of the repo with the command
git clone --mirror <repo_url_here>
2. Navigate to the directory of the mirror clone and run the command
git count-objects -Hv
What output do you get from this command?
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.
getting,
count: 0
size: 0 bytes
in-pack: 27531
packs: 1
size-pack: 380.93 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.
Thank you, Amit.
The size you see locally doesn't have a big difference from the size that Bitbucket reports for this repo. This is the size of all history in this repo.
How exactly did you delete files from this repo? Did you rewrite history or did you simply commit file deletions? Please note that committing file deletions does not remove files from the repo's history. The files still remain in older commits.
If you committed file deletions, you'll need to rewrite history in the repo to remove these files from history as well.
I posted detailed steps about this in an answer to a different question:
If you already rewrote history, then you'd need to rewrite history further to remove additional files from history.
If you clean up the repo further, it will need another git gc after you push. You can let me know and I will run it again.
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.
i have done all the above steps,
count: 0
size: 0 bytes
in-pack: 27531
packs: 1
size-pack: 125.77 MiB
prune-packable: 0
garbage: 0
size-garbage: 0 bytes
Please run garbage collection
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your message, Amit.
I ran another git gc. The repo in Bitbucket still has a size of 382.8 MB.
Since your mirror clone shows a smaller size now, I think we are facing the issue I mentioned in an earlier reply. The large files may still be referenced by pull requests (even though they have been removed from history).
In this case, we would need to delete Pull Requests to get these files removed. Is this something you'd be willing to consider? If so, I can create a support ticket on your behalf, and one of my colleagues can give you a link to the Pull Requests with large files. You can then consider whether you want these PRs to be deleted. We will not delete PRs until you give us permission to do so.
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.
Thank you for your response. Kindly proceed to create a ticket for me so that we can delete those pull requests.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, Amit.
I created a support ticket on your behalf using the email address of your community account. I added an internal summary for my colleagues, explaining what we have discussed and done so far.
You should have received an email with a link to the support ticket. You can also see the ticket here https://support.atlassian.com/requests/ after you log in with the email address of your community account. One of my colleagues will reach out via the support ticket.
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.
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.