Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Repository > 2GB, can't push anymore

Franco Consoni November 19, 2020

Our repository grew up beyond 2GB.


I cleaned up the local repo, and followed up the steps to reduce the repo size, but it just got locked, so I can't push any change.


Can you help me?

2 answers

1 accepted

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 20, 2020

Hi Franco,

When a repo goes over 2GB and you switch to the commit before the bad one, a git gc is needed on the remote repo. This should run automatically if you have enabled the Lab feature Delete dangling commits when over size limit. I can see this is not enabled for your Bitbucket account, so I believe this is why the git gc did not get triggered.

I checked your account in our system and found which repo is more than 2 GB from the ones you have access to, and ran a git gc on it. Its size is now 1.3 GB so you and your team should be able to push.

Now, for reducing the repo's size, removing a file with git rm will not remove it from the repo's history.

If you have any files/folders in the repo that do not need to be versioned, you can remove them either with git filter-branch or with a tool like BFG

Afterwards, you can check the size of your local repo with

git count-objects -Hv

It will be the sum of the fields size and size-pack in the output. If you're ok with the new size, you can push that to Bitbucket. Please note that when you do this the repo size will go up again. Don't be alarmed, this is expected because the remote repo will contain both old and new refs. Another git gc will be needed on the remote repo to have the old refs removed, and its size should then go down.

If you push history rewrite, the git gc won't get triggered automatically, so I would suggest opening a ticket with the support team right after to request a git gc for that specific repo. You can do so via the following link:

https://support.atlassian.com/contact/#/

In "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 the repo is over 2 GB and your team is blocked from working, to ensure you get a timely response.

If you have any questions, please feel free to let me know.

Kind regards,
Theodora

Franco Consoni November 20, 2020

Thank you very much for everything

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 23, 2020

You are very welcome, glad to have helped.

0 votes
IT-Appenzeller-Kontaktlinsen November 20, 2020

Can you please go into more detail what steps you followed to reduce the repo size?

(I wish I could comment the question, as this isn't really an answer...)

Franco Consoni November 20, 2020

Thank you for answering.

When the repo was blocked, I switched to the commit before the bad commit and pushed (as the oficial guide says).

Then, I deleted the Pods/ folder (iOS repo, an old and bad decision), ran git gc --aggresive, git rm -rf Pods/, even ran filter-branch.

But it doesn't seems to like it, because I couldn't push.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events