Hello,
I tried reducing the repo size. However, the current repo went from 2.4 Gb to 3.3 Gb. Could you please help me running a git gc.
Workspace -> https://bitbucket.org/<redacted>
Thanks, Andres
Hello @Andres Vargas Gonzalez and welcome to the Community!
I was able to identify the repository in question based on the workspace you shared, and I manually triggered an aggressive garbage collection which managed to reduce it's size back to 1.5GB.
Now that GC is completed, I would highly recommend you having everyone on your team removing their old copies of the repository and doing a fresh clone of it. Since the old clones have a dirty history, it's better to delete them, so you don't risk pushing the dangling objects back into your cleaned repository, which would increase its size again.
Also, the size you see in a local clone may be different that the remote size you see in bitbucket, because bitbucket also has to store references to the open pull requests. You can find more details on that in the following article :
Thank you, @Andres Vargas Gonzalez !
Patrik S
Hello Patrik,
Thank you for the warm welcome and the help provided.
I see the repo size updated to 1.5Gb. I will be doing some more cleaning on this repo and another repo I have. Is there anyway I can submit a request for future iterations. I have another repo in a different workspace that will perhaps pass the 4Gb if it accumulates space after cleaning.
The other repo is more critical as we use it daily.
Is this the best way to communicate these issues ?
Thanks, Andres
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Andres Vargas Gonzalez ,
I see you have access to a workspace with an active Bitbucket subscription, so you are entitled for Standard support. This means you can raise a support ticket with Bitbucket Cloud in the following portal and request a GC for the other repository you are going to do the cleanup :
When creating the support ticket you will be asked to provide the workspace Id. Make sure to provide the workspace ID where you have the active subscription :)
Thank you, @Andres Vargas Gonzalez !
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Patrik,
Could you help me with another GC for the same repo you helped me with previously. I will then move the repo to the workspace with Bitbucket subscription.
Thanks in advance, Andres
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We would not have access to your repository. You can try one of the options mentioned here to reduce the size
https://stackoverflow.com/questions/1904860/how-to-remove-unreferenced-blobs-from-my-git-repository
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When I clone the repo after using this tool -> https://rtyley.github.io/bfg-repo-cleaner/
The repo is smaller in size. However in bitbucket it shows a size of 3.3 gb instead of 800 Mb as the cloned repo shows.
I am looking at the link you sent too thanks !
Thanks, Andres
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> The repo is smaller in size. However in bitbucket it shows a size of 3.3 gb instead of 800 Mb as the cloned repo shows.
Not an expert on git (or how it's implemented in bitbucket), but I think this is expected. Locally in your clone, git won't store each file in different branches fully. It will store compressed versions of changes. OTOH on bitbucket if a file is different in two branches, bitbucket will store both versions of the file in their entirety so you can quickly view both of them on the web UI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am cloning a full copy of the Git database of my repository. Before attempting to reduce the size. It was around 2.5 Gb. After attempt to reduce the size the full copy of the git db of my repo is 800 Mb. When downloaded from git is 800 Mb and not 3.3 GB.
I was reading at this -> https://github.com/rtyley/bfg-repo-cleaner/issues/68#issuecomment-191117240
Not sure if that might be the reason.
THanks, Andres
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hariharan thank you ! It got solved on the next thread.
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.