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,294,738
Community Members
 
Community Events
165
Community Groups

Repository size exceeds limit but GC is not working

Hello, one of our repositories recently exceed the size limit of 4GB.

We used the official guides and came to a point where we cannot push anymore because repo size is not changing apparently because the automatic GC is not working properly.

Can you help? Maybe you could run the GC manually against our repo?

Thank you very much in advance!

1 answer

0 votes
Ben Atlassian Team Jun 09, 2022

G'day!

I have ran the git gc operation manually against your repository and the size has only decreased by 100mb. This is likely because you still have large binary files present in your repository which are not stored in GIT LFS.

I would recommend looking through your repository to find file extensions which include large binary files and then making use of the BFG Tool to convert existing large files to GIT LFS.

A guide can be found here:
https://support.atlassian.com/bitbucket-cloud/docs/use-bfg-to-migrate-a-repo-to-git-lfs/

Cheers!

- Ben (Bitbucket Cloud Support)

Hi Ben, thanks for your answer!

I'm working on Giovanni's repo and after that you GC manually on it I proceeded to perform the git filter-branch operation as described in https://support.atlassian.com/bitbucket-cloud/docs/maintain-a-git-repository 

The operations performed in detail are the following : 

git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch our_biggest_file_path' --prune-empty

git for-each-ref --format='delete %(refname)' refs/original | git update-ref --stdin

git reflog expire --expire=now --all

git gc --aggressive --prune=now

git push --all --force

After that, our repo size instead of going down has gone up (now it's 4.15 GB) and now we are stuck again.

What did I do wrong? Could you help us?

Our team chose not to use LFS and to backup our biggest binary file on external cloud servers : thus, we are happy to loose all the history information about that file, hence the use of git filter-branch.

Thank you very much,

Michele

Like a_ferrari likes this
Ben Atlassian Team Jun 15, 2022

Hey Michele,

Apologies for the delay in response - I was OOO for a few days. 

I have ran a git gc and the repository size is still only 3.9GB, are there any other files which can be removed - given that you do not wish to use GIT LFS?

If you need further assistance, please let me know and I will raise a ticket formally so I may look into the backend of your repository and identify any problematic large files in your commit history.

Cheers!

- Ben (Bitbucket Cloud Support)

 

Could you please run again git gc on our repo since I removed another big file?

If it still doesn't solve our size problem, then yes, we could really use further assistance.

Thank you in advance,

Michele

Ben Atlassian Team Jun 16, 2022

Hi @m_liscio @gtugnolo 

I have performed a subsequent gc and the size of the repo has only reduced by 200mb (it is now 3.7GB).

I have opened a support ticket on your behalf, you should receive an email with a link to the request - we will communicate further on there.

Cheers!

- Ben (Bitbucket Cloud Support)

Like m_liscio likes this

Suggest an answer

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

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,159 views 2 9
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