Hey,
I think one of our repositories needs a garbage collection, after following the recommended reduction steps. Online is at 2.43 GB
Given that there is no way to open a ticket for that - Can someone from the Team run it for us on the oversized repo?
Thank you so much!
Hi, @Dominykas Vilipas! Welcome to the community!
I run the GC against the repository that was showing 2.43 GB, however, the size hasn’t changed. Could you please confirm the steps you have followed to decrease the repo size?
Looking forward to hearing from you.
Kind regards,
Caroline
my steps were
git reflog expire --expire-unreachable="now" --all
git prune --expire="now" -v
git gc --aggressive --prune="now"
repository now is from scratch so need to delete old history , now if I am not mistaken is only 5 commits
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Dominykas.
Thanks for the additional information. The commands you have run have performed a local GC on your repository. However, the GC will just remove dangling commits and repack your repo, but it won’t affect the repository size that much.
So, in case you want to decrease the repo size, you could for example remove large files and use BFG to remove them from the history, and then we can run the GC on our side to also remove them from the remote repository as well. You can also move these large files to LFS if you want.
In order to perform these changes on your repo, the following documentation has a very good explanation of how to achieve this:
https://support.atlassian.com/bitbucket-cloud/docs/use-bfg-to-migrate-a-repo-to-git-lfs/
I hope this helps, but do let me know if you have any questions.
Kind regards,
Caroline
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It doesnt help because repo size is only 1GB when i clone It so something calculated wrongly in bitbucket
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @Dominykas Vilipas.
You mentioned that your "repository now is from scratch so need to delete old history". Could you please clarify what exactly you mean by that? Did you delete the .git folder of the repo and initialize a new repository? Or have you performed anything in your local repo to delete older commits besides the commands you reported above?
Also, could you please take a mirror clone of the repo (with the --mirror flag) and then run the following command inside the mirror clone directory, and share the output with us?
git count-objects -vH
This will show us the exact size of this repository. Please note that if you take a clone without the mirror flag, only the main branch will be pulled locally, so we need the output of this command on a mirror clone.
Looking forward to hearing from you.
Kind regards,
Caroline
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.