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

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.

0 votes
Vishwas Community Leader Dec 22, 2021

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

Atlassian Community Events