Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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
4,463,211
Community Members
 
Community Events
176
Community Groups

Repository > 2GB, can't push anymore

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

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

Thank you very much for everything

You are very welcome, glad to have helped.

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...)

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

Atlassian Community Events