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

Unable to delete a file

blacaze December 1, 2020

My repository has exceeded the size limit. I've tried to delete some larger files to free up room, however, I am unable to delete remove files from my repository. The ways I've tried to delete the files are:

 

  • Navigating to the files in bitbucket, click the ellipses, selecting delete
    • results in the "something went wrong" error
  • Navigating to the files in bitbucket, click the ellipses, selecting Annotate, selecting edit dropdown, selecting delete
    • results in the "something went wrong" error
  • Removing the files from my local repository, committing, and trying to push
    • results in an error message saying I cannot commit because the remote repository is too big

 

Any support would be appreciated.

1 answer

1 accepted

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 2, 2020

Hi @blacaze ,

I can see one repository over the 2 GB limit from the ones that you have access to.

I ran a git gc on it, however its size has not been reduced.

Committing file deletions will not work in this case, as this will not remove the files from the repo's history and it will not have any effect on the size.

Did the size of this repo increase as a result of one large commit?
E.g. did you accidentally push some large files that you didn't want to be in the repo?
Or do you version in the repo binary/large files throughout its history?

There are two options here:

1. If the repo's size increased because of one large commit, then:

  • You can rewind (reset) the branch this commit belongs to, to the commit before the bad one
  • Go to your account's Labs settings in https://bitbucket.org/account/settings/features/ and enable the feature Delete dangling commits when over size limit
  • Afterwards, push this change. A git gc should get triggered automatically.

This process is explained here:

When the repo's size is over 2 GB, the only thing that can be pushed is a git reset before the commit that made the repo go over 2 GB. No new commits can be pushed, even if it's commits with file deletions.

2. The second option, if the repo has large files throughout its whole history, would be to rewrite history and

a. either remove any large files that do not need to be versioned, see: https://support.atlassian.com/bitbucket-cloud/docs/maintain-a-git-repository/
b. or, if any large files need to be versioned, move them to Git LFS: https://support.atlassian.com/bitbucket-cloud/docs/use-bfg-to-migrate-a-repo-to-git-lfs/

You will need support's assistance in this case, to temporarily increase the repo size limit so you can push.

You can open a support ticket via https://support.atlassian.com/contact/#/, in "What can we help you with" select "Technical issues and bugs" and then Bitbucket Cloud as product. In "What is the impact to your business?" make sure to select "Level 1" since the repo is over 2 GB and you are blocked.

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

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events