Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Not able to push the code due to 4GB size limit.

Repository size exceeds limit

This repository is over the 4 GB limit and you are not able to push new commits. To resolve this, contact your repository’s admin.
This is the error message showing.

2 answers

1 accepted

0 votes
Answer accepted

Hi @Raju Prasad,

I checked the repositories your Bitbucket Cloud account has access to, and I saw 3 repositories with a size over the 4 GB limit. I ran a git gc for all 3 repos, but their size remains unchanged.

Could you please let us know:

  1. Do you version any large and/or binary files throughout the history of the repo?
    Or did the size of these repos increase because you accidentally pushed a large commit in the last push?
  2. You gave the output of the git gc command in your reply. Did you use BFG to remove any large files or migrate to LFS, prior to running this command? It's unclear if you have followed any of these steps.
  3. What is the output of the command git count-objects -Hv in your local clone for these repos?
    The sum of the fields size and size-pack in the output will show the size of your local repo.

Kind regards,

Hi @Raju Prasad,

The size of your local repo seems to be smaller than the Bitbucket repo (although it is still large, and it would be good to reduce it for performance reasons.

I would suggest creating a ticket with Bitbucket Cloud support team to assist you further. Since you are a member of a workspace on a paid plan, you can create a support ticket via In "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product.

Please provide in the ticket:

  • the URL of the repo (the ticket will be visible only to you and Atlassian staff)
  • info about all 3 questions I asked in my reply above. We can help you better if we have the information I asked for in my reply above.

Kind regards,

Thanks issue got solve via support thicket.

Hi @Raju Prasad 

Are there any big files on the repo ? to check if there are any large files and you want to remove them you can use bfg utlity, check out this link

In case if you want to retain the large files you have to use git lfs.

But as a simple steps to start with you can run git gc on the repository to reduce the size.

Please check out this link here



git reflog expire --expire=now --all && git gc --prune=now --aggressive

Counting objects: 22729, done.
Delta compression using up to 4 threads.
error: pack-objects died of signal 976)
error: failed to run repack


Getting this error.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

106 views 2 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you