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

How can we reduce the size of repo >2gb

Vijaya Ragavan Myeilswamy November 5, 2020

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
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 6, 2020

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 5, 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
AUG Leaders

Atlassian Community Events