Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

reduce remote repo size

I am getting repo over 2.0 GB warning. 
I checked my local repo using 

git count-objects -Hv

The local repo size shows 1.20 GB however my remote repo is 2.67 GB. Any workaround on how i can match my remote repo size to local? 

2 answers

1 accepted

0 votes
Answer accepted

Hi @Manish Maharjan and welcome to the community.

I see that your question has the tag 'bitbucket-server', however, this warning shows for Bitbucket Cloud repos (hosted in Could you please first confirm if your repo is hosted in Bitbucket Cloud ( or in Bitbucket Server (self-hosted instance)?

There is one possibility that the mismatch occurs because your local repo may not have all remote branches locally. I would suggest taking a clone of the repo with the --mirror flag and then run git count-objects -Hv in that mirror clone.

If the output in the mirror clone still shows as less than 2.67 GB, then the remote repo might need a garbage collection because it may have e.g. dangling commits.

In Bitbucket Cloud, users cannot trigger a garbage collection themselves (although we have a feature request to add this functionality:, but we can run it for your repo.

If this is indeed a Bitbucket Cloud repo, can you give me the last 2 letters of the repo so I can identify it and run a git gc for it? Alternatively, if the repo is owned by a workspace on a paid billing plan, you can create a ticket with the support team and request a git gc for the repo. You can create a ticket via, in "What can we help you with" select "Technical issues and bugs" and then Bitbucket Cloud as product.

Please feel free to let me know if you have any questions.

Kind regards,

Hello Theodora,


I apologise, yes our repo is hosted in Bitbucket cloud not server.


Yes I tried the mirror clone and the size is less than 2.67GB. 

My last two letters of the repo are id. Please let me know if you can run git gc.


Thank you,


Hi Manish,

Of course, I identified the repo and I ran a git gc for it, its size is 1.1 GB now.

Please feel free to let me know if the warning is gone now and if you need anything further.

You can also add your vote and add yourself as a watcher to the feature request I mentioned ( if you'd like to get notified via email on updates.

Kind regards,

Hi Theodora,

Thank you. It worked. I appreciate your support.




Like Theodora Boudale likes this
0 votes
Pramodh M Community Leader Jan 24, 2022

Hi @Manish Maharjan 

Welcome to the Community!!

Use git-lfs-migrate to detect the large files

You can use bfg-repo-cleaner to reduce the repo size


Suggest an answer

Log in or Sign up to answer

Atlassian Community Events