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,464,095
Community Members
 
Community Events
176
Community Groups

My Repo size exceed 4GB limit and I deleted my wrong remote branch

Edited

Hi dev support.
I have wrong commit that push around 1GB to remote repo and my repo size exceed 4GB limit. I try to fix the commit locally as suport center told but can not force push so I decide to deleted the remote branch contain the oversize commit but nothing change.
Then I try to create branch with same name in remote repo but it seem that repo size not reduce.
Now I can not do anything to fix the problem.

Can anyone help me please.

2 answers

1 accepted

0 votes
Answer accepted

Hi @Le Ni and welcome to the community!

Yes, I can assist you with this. I can see that your Bitbucket Cloud account has access to quite a few workspaces and repositories. Could you please let me know the last two letters of the repo and the last two letters of the workspace this repo belongs to, so I can identify the one you are talking about, and run a git gc for it?

Kind regards,
Theodora

@Theodora Boudale Thank you. Because I join so many workspace, the last 4 letters of my workspace is saco and the last 4 letters of my repo is main

Hi @Le Ni,

Thank you for the info. I ran a git gc for the repository and its size has been reduced. It's under the 4 GB limit now, but still quite large.

Is the large commit still part of the repo's history? If you go to the repo on Bitbucket Cloud website, and then open the Commits page of the repo, do you see the large commit listed there?

Kind regards,
Theodora

Like Le Ni likes this

Thank you so much for your support. This repo has many of our mistakes, many large commits months ago.

Those large file is start point of many commits but nearly commits does not has any big size file. I dont know how to reduce the repo size now. Today I add a hundreds MB commits and you did gc but the size not reduce same size as my mistaken commit.

We do not use these really large file anymore, deleted on our repo but it still living in bitbucket in many branch and I do not know how to remove all of it too

Hi @Le Ni,

Committing file deletions is not going to remove these files from the repo's history. This is only possible if you rewrite history in the repo, with a tool like BFG.

I made a detailed post about this in a different question:

It's quite long, but I would suggest reading all of it to better understand what you need to take into account. If you have any questions about the content, please feel free to let me know.

A few things that I mention in that post as well:

  • Always take a backup of the repo prior to doing a history rewrite

  • History rewrite will change commit hashes, it's good to communicate this to your team so there are no surprises, and also so that they take a fresh clone of the repo after you push your changes (and avoid pushing the old history back)

  • If you push to the Bitbucket repo after doing a history rewrite, the repo size will probably go up again and the repo will need another git gc. You can let me know here and I can run it again for the repo.

Kind regards,
Theodora

Like Le Ni likes this

@Theodora Boudale I already try BFG but as you said, the repo size go up and need another git gc. I'll folk this directory to my another workspace today and do BFG one more time. After everything pushed, I'll ask for your help . Thank you again

@Theodora Boudale I did folk my old repo to another repo, then do BFG tutorial and already push. Can you help me check this repo and run git gc on it.
Workspace last 4 character is saco and repo last characters is main_new

Hi @Le Ni,

I ran a git gc on both repositories:

  • Repo with a name ending in main shows on change in size, it is 4 GB
  • Repo with a name ending in main_new now has a reduced size, 2.9 GB

Does only the second repo (main_new) have the changes with BFG?

Please feel free to let me know how you would like us to proceed now:

  • If the fork seems to be in good shape, I can temporarily increase the repo size limit for the main repo, so you can push your changes to that one, please let me know.
  • If you would like to remove more files with BFG from the main_new first, please let me know when you push so I can run another git gc.

Kind regards,
Theodora

I asked my team to move to folk repo, everything seem good now. Thank for supporting me

You are very welcome @Le Ni. If you need anything further, please feel free to reach out!

@Theodora Boudale 
Hi, I saw support help git gc on some project. I dont know how long does it take for a support member to see my disscusstion so I tag you here. Sorry for that

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events