Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Différent size between local and remote repo

Said KHADRAOUI
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 26, 2023

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.

1 answer

1 accepted

0 votes
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 27, 2023

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

Said KHADRAOUI
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 28, 2023

@Patrik S  Thanks a lot !

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events