Not able to push the code due to 4GB size limit.
Asked by Raju Prasad:

Repository size exceeds limit {#toc-hId--1207654345}
----------------------------------------------------

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.


Answers:
author: Theodora Boudale
body: Hi [@Raju Prasad](/t5/user/viewprofilepage/user-id/4683018),

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,  
Theodora

comments: author: Raju Prasad
body: ![Screenshot from 2021-12-22 18-11-11.png](https://community.atlassian.com/t5/image/serverpage/image-id/175070i7FEE9792A9C7FBDF/image-size/large?v=v2&px=999 "Screenshot from 2021-12-22 18-11-11.png")


author: Theodora Boudale
body: Hi [@Raju Prasad](/t5/user/viewprofilepage/user-id/4683018),

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 <https://support.atlassian.com/contact/#/>. 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,  
Theodora


author: Raju Prasad
body: Thanks issue got solve via support thicket.


author: Vishwas
body: Hi [@Raju Prasad](/t5/user/viewprofilepage/user-id/4683018)

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 <https://rtyley.github.io/bfg-repo-cleaner/>

In case if you want to retain the large files you have to use git lfs. <https://support.atlassian.com/bitbucket-cloud/docs/use-git-lfs-with-bitbucket/>

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 <https://community.atlassian.com/t5/Bitbucket-questions/Repository-size-exceeds-limit-Unable-to-push-latest-code/qaq-p/1788868>

Regards,

Vishwas

comments: author: Raju Prasad
body: **git reflog expire --expire=now --all \&\& git gc --prune=now --aggressive**

<br />

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.


Tags: bitbucket-cloud

cloud