Repo Size Increased, please reduce.
Asked by Pankaj Mundra:

Hi,

I already raised a issue about repository oversized and at that it was reduced from your end, but now again facing the same whereas, I have already removed the unwanted files but still after 2 months repo size is automatically increased.

Request you please reduce the size of repo from your end.  

I ran "git gc"

Than I ran "git count-objects -vH"

Below is the output:  

count: 0  
size: 0 bytes  
in-pack: 40155  
packs: 1  
size-pack: 1.45 GiB  
prune-packable: 0  
garbage: 0  
size-garbage: 0 bytes

Thanks,

Pankaj Mundra


Answers:
author: Theodora Boudale
body: Hi [@Pankaj Mundra](/t5/user/viewprofilepage/user-id/5046675),

Your Bitbucket Cloud account has access to several repositories. I saw one repo with a size close to the 4 GB limit, I ran a git gc for it and its size has been reduced.

In case you would like me to run a git gc for a different repo, could you please provide the repo name masked (i.e. a few letters that can help me identify it among the ones you have access to)?

Kind regards,  
Theodora

comments: author: Pankaj Mundra
body: Hi [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) ,

Thanks, you did the action on the required repository.  

Just wanted to know, if there is any way next time I can do this step myself.

Also, can you please let me know what is the current size of the repository you ran the command.

Thanks,

Pankaj Mundra


author: Theodora Boudale
body: Hi [@Pankaj Mundra](/t5/user/viewprofilepage/user-id/5046675),

You are very welcome. The repo's size was 1.4 GB when I ran the git gc two days ago, and I see it is 1.5 GB now.

I'm afraid that it is not possible for end users to trigger a git gc for their remote repos.

A full garbage collection will run automatically if a repo is over the 4 GB limit and you push an update with a git reset. This is useful if the repo goes over the limit because of an accidental push of a large commit, you can read more details here:

* <https://bitbucket.org/blog/updated-repository-limits-and-automatic-garbage-collection>

In all other cases, you can create a question here and either I or one of my colleagues can trigger a git gc for your repo.

We have a feature request for what you are asking <https://jira.atlassian.com/browse/BCLOUD-11593> . You can add your vote and comment there to further express your interest.

Kind regards,  
Theodora


author: Pankaj Mundra
body: Hi [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) , can you please again run the command to reduce repo size.

Also, can you please check and tell me why every time the repo size increases, what is wrong I am committing.  

Thanks,

Pankaj Mundra


author: Patrik S
body: Hey [@Pankaj Mundra](/t5/user/viewprofilepage/user-id/5046675) ,

I've just triggered a garbage collection in your repository and the size was reduced to 1.5GB.

Now that GC is completed, I would highly recommend you having everyone that has cloned that repository to remove their old local copies and do 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.

Thank you, [@Pankaj Mundra](/t5/user/viewprofilepage/user-id/5046675) !

Patrik S


Tags: bitbucket-cloud

cloud