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,456,930
Community Members
 
Community Events
176
Community Groups

Repository is over the size limit (4 GB) and will not accept further additions.

Edited

We accidentally uploaded file of 2.5 GB which exceed limit of 4GB because our repo is already large enough ( more than 2 GB ).

To fix that issue, I tried hard reset in my local system then force pushed over git repo.

Now, I'm not able to push anything.

 

I think the only thing I have my hope on to run the garbage collector. Can you please help me?

PS: Every suggestion really appreciated by me.

Thanks in advance.

1 answer

1 accepted

1 vote
Answer accepted

Hi @sunnytecho and welcome to the community!

I found one repo over the 4 GB limit from the ones you have access to. I ran a git gc on it and its size is 2.1 GB now.

Could you please let me know if you can see the update size now and if you are able to push?

Kind regards,
Theodora

Hey Theodora,
Thanks for your help. 🙏
But, unfortunately I tried to send updates and it's again turned into 4.3 GB

I do have that commit in my local system.
I removed that commit then run git gc in my local system.

Any chances do you run that command again?

Thanks in advance?

Hi @sunnytecho,

You are very welcome and of course. I ran another git gc, but I'm afraid the repo's size hasn't been reduced.

If you open the repo on Bitbucket Cloud website and check its Commits, do you see there the commit with the large file?

If so, is it the last commit on a branch?
Or have you pushed additional commits after the large one?
Has this branch (with the large commit) been merged into any other branches?

I am asking because I don't have access to your repo's content.

Kind regards,
Theodora

Thanks Theodora,

Unfortunately, It's not a last commit. I did add few other important changes in different commits.

 

It's also available in other branches as well on my local system which is no longer useful for me.

But, master branch is one which have this large file in local system and bitbucket server.Unfortunately, It's not a last commit. I did add few other important changes in different commits.

 

It's also available in other branches as well on my local system which is no longer useful for me.

But, master branch is one which have this large file in local system and bitbucket server.

Hi @sunnytecho,

If the commit with the large file still exists in the Bitbucket Cloud repo and if you have added more commits after that, I would suggest using BFG to rewrite history and remove the large file from the repo's history:

That link includes step-by-step instructions on how to use BFG as well as examples. If there is one large file that you want to remove, you can use BFG with the argument --delete-files (example included in the link).

A few things to note:

  • As mentioned in the link, please make sure to take a backup of the mirror clone of the repo before you use BFG, in case anything goes wrong.

  • After you use BFG, I would suggest first pushing the changes to a newly created empty Bitbucket Cloud repo, inspect it and see if it's in a good state.

  • After you use BFG, you can use the command git count-objects -Hv in the mirror clone where you executed BFG, in order to check the size of your local repo (it will be the sum of the fields size and size-pack in the output).
    When you have a repo with a size of less than 4 GB, please let me know and I can temporarily increase the repo size limit so you can push your changes to the repo you're using now, and then run another git gc on the repo.

  • BFG rewrites history, which means that the commit hashes will change. It would be good to communicate this to the other users with access to the repo so there are no surprises, and also ask them to take a new clone after you push your changes (in order to avoid pushing any of the old changes back).

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

Kind regards,
Theodora

Thanks Thedora for your support.

I'll check and keep you posted.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS

Atlassian Community Events