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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How can we reduce the size of repo >2gb

remote: Learn how to reduce your repository size: https://confluence.atlassian.com/x/xgMvEw.
To https://bitbucket.org/carters-ondemand/ecomm-automation.git
! [remote rejected] carters -> carters (pre-receive hook declined)
! [remote rejected] development -> development (pre-receive hook declined)
error: failed to push some refs to 'https://bitbucket.org/carters-ondemand/ecomm-automation.git'

 

We also tried deleting all branches and files and now the repo has only the master branch with .gitignore. but till it is showing 2gb data.

2 answers

0 votes

Hi Vijaya,

If a repo's size is above 2 GB (and below 5 GB), then you can remove the read-only limitation by following the steps listed in "Undoing the last push" in the following doc:

If you enable the Labs feature "Delete dangling commits when over size limit" and then rewind history to undo large commits, a git gc should be triggered automatically. Otherwise, you'll need to create a support ticket and request a git gc for the repo after you rewind history and push.

If a repo is over 5 GB, the steps above will not work and a support ticket will be needed to get help with this issue.

I see that you have already opened a ticket for this, if you need anything further feel free to let us know.

Kind regards,
Theodora

0 votes
Mikael Sandberg Community Leader Nov 05, 2020

Hi @Vijaya Ragavan Myeilswamy,

Welcome to Atlassian Community!

Removing branches (they are just pointers to commits) and files does not effect the size of the Git repository, you are just adding new commits to the history. You need to undo you last commit in order to get under 2Gb by undoing the push. Have a look at this KB on how to do that. You should also take a look at this one about splitting your repository in two.

Suggest an answer

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

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,719 views 10 16
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