Hello, in Bitbucket shows a size of 3.52 GB but my repo locally is showing 405 MB when I run "git count-objects -v". Am I missing something here? Is Bitbucket Cloud counting something else? I haven't change anything locally and did a git pull.
Hello @Said KHADRAOUI and welcome to the community!
It might have been the case that your repository has objects/commits that became dangling after undoing a push or rewriting the history.
I was able to find a repository you have access to that had a size of 3.5GB, so I went ahead and executed a git garbage collection on that repo to remove any dangling objects, which helped to reduce the size down to 1.6GB.
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.
If you would like to reduce the size further, you might need to remove any large files you still have in the repo history or migrate them to LFS storage. You can find detailed instructions on how to do that in the article Reduce repository size.
Thank you, @Said KHADRAOUI !
Patrik S
@Patrik S Thanks a lot !
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.