Create
cancel
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

Repository size exceeds limit

This repository is over the 2.0 GB limit and your contributors are not able to push new commits. To resolve this, reduce the repository size.Cant commit further. Can any please let me know How Can I reduce repository size ?? or any alternatives to reduce the size 

4 answers

1 vote

Hi Safaa,

If you can let me know the URL of this repo, I can run a git gc on it. This may be enough to reduce the repository size.

There are many things that contribute to the repo's size, like the size of the files in the repo, the size of diffs, the number of commits.

If the repo contains large files, and its size remains large after a git gc, a way to reduce its size would be to:

  • either remove from the repo's history large files that do not need to be versioned
  • or, if there are large files that do need to be versioned, move them to Git LFS

I would suggest that we run a git gc first, as this may be enough. If not, then we can discuss next steps.

In case you don't feel comfortable sharing the repo URL here publicly, you can open a ticket with the support team via https://support.atlassian.com/contact/#/. In "What can we help you with?" select "Technical issues and bugs" and then select Bitbucket Cloud as product. Make sure to mention the URL of the repo that is over the size limit.

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

Kind regards,
Theodora

Hi @Theodora Boudale

The url of the repos is: https://SafaaKhalaf@bitbucket.org/digitalnoir/weber-kitchen-builder-ios.git

I have already deleted some branches to get the size smaller but that didn't make any change. So maybe after running git gc the repo size would reduce.

Thanks in advance.

Hi @safaa ,

Thank you for your reply. I went ahead and ran a git gc on this repo, its size is 926.1 MB now. This is below the 2 GB limit so you shouldn't have any issues pushing. It's still quite large though, so I would recommend reducing the size further, if possible.

Do you have any large files in the repo that you don't need to version? Or do you version any large files, that could be moved to Git LFS?

Kind regards,
Theodora

Hi @Theodora Boudale, 
I'm facing the same issue. 
Can you help me?

Repo: https://bitbucket.org/backendpag/pag-ios

Thanks

Hi @Itamar Silva , I replied to the question you created as well, I ran a git gc for the repo and its size has been reduced. Please feel free to let me know if you need anything further.

Like Itamar Silva likes this
Like Theodora Boudale likes this

@Theodora Boudale  We are facing the same issue.  Here is our repository URL:

 git@bitbucket.org:ArteriorHome/arteriors_m2.git

Please help me remove of arteriors_in, media, pub, genrated@@  folders and sql files from root directory.
can you please add .jpg, .jpeg and .png in .gitignore file.
we followed your link to undoing all changes but unable to do so, When we are trying to push the code it again through an same error you can  not push the code.

Please help to remove that exceed message from repository.

Thanks
Gagandeep

Hi @GagandeepSingh1  ,

I have run another git gc on the repo, but its size remains above the 2 GB hard limit.

I have opened a ticket for you with the support team which you can find here:

The support team can give you guidance in this ticket on how to reduce the repo size and how to have this limitation removed.

Kind regards,
Theodora

HI @Theodora Boudale 
Thank you for your help. I will check.
Regards,
Gagandeep

@Theodora Boudale  I am facing the same issue. Can you please help. Here is my repository URL:

 git@bitbucket.org:ArteriorHome/arteriors_m2.git

Please help me remove of .SQL files from root directory.

Hi Raj,

I ran a git gc on this repository, its size went down to 344.5 MB. You and your team should be able to push to the repo again.

If you would still like to remove .SQL files from the repo's history, you can do so either by using BFG tool, or by using git filter-branch. There are detailed instructions on how to do this in the following documentation:

I would suggest reading all info in that page in order to understand how the process of rewriting history and file removal works. If you want to try it, I would also suggest that you first create a fork of the repo and test it there, before doing this in the repo everyone is working on.

If you rewrite history and push to the Bitbucket repo, its size will go up. Please don't be alarmed, another git gc will be needed to remove the references that were deleted and for the repo's size to go down. Feel free to let me know when you make the push or open a support ticket, and we can run another git gc on the repo.

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

Kind regards,
Theodora

Hi @Theodora Boudale , Can you please perform the above operation again. as the repository size is again exceeded. 

 

And please help us remove with the following file and update the .gitignore file:

remove all .SQL file from the branch and mention them into .gitignore

Mention the .jpg, .jpeg and .png not to be synchornized. 

 

Thanks In advance.

Hi @Raj Dhiman ,

I ran another git gc on the repository, however its size is still 4.3 GB.

One thing you can do, is follow the steps in the following documentation (title "Undoing the last push") to remove the read-only limitation from the repo:

If you face any issues during the process or if the git gc doesn't run automatically when you rewind the branch and push your changes, I would suggest opening a support ticket via https://support.atlassian.com/contact/ to request further assistance. In the field "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product. In "What is the impact to your business?" make sure to select "Level 1" if your team cannot work because of this.

It is not a problem at all to post here, however, considering that this issue is a blocker for you, you will get faster responses from the support team for a "Level 1" issue.

I'm afraid that we cannot remove any files from repo's history from our side, but the support team will be able to guide you on how to do this.

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

Kind regards,
Theodora

Suggest an answer

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

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,762 views 10 16
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