How to push in read-only mode?


My bitbucket-repository is too big (> 2GB) so I am now in 'read-only mode'.

Because I want to use my repository, I cleaned (= delete all nonnecessary files) using BFG ( which is recommended by Atlassian (see I used BFG to do the trick and I deleted some of the big unnecessary files, but when I want to do the final step: push the repository back, it says that my repo is too big: 

"remote: repository is in read only mode (over 2 GB size limit).
remote: Learn how to reduce your repository size:"

How can I clean up  my repository when I can't push anything ?

 I am fighting with it almost 3 weeks so I hope I can get an answer soon (because it starts to frustrate me.


7 answers

1 accepted

2 votes
Answer accepted

The helpdesk gave me following solution, which was very helpful to me.


"As this repository is extraordinarily large, you should reset the head of your repository then attempt a force push and let us know how it goes.
git reset --hard HEAD~1
git push --force

Same problem. Using git bash I've undone lots of commits with command $ git reset --hard HEAD~N, but I can't push anything - repository is readonly. How did everyone resolve the issue?

Louie Camacho I'm New Here Tuesday

Dealing with the same issue. Hopefully this comment will bump yours up.

Hi Louie, I ended up making a request in the help center, they ran GC on my repo and everything worked. 

Like 1 person likes this

Thanks, I think my deletion commits worked for me. I moved my large files locally and performed a commit. There was a delay of about 25 mins before it took effect. Hopefully someone sees this and overcome similar issues.

0 votes
Jim Redmond Atlassian Team Jul 30, 2017

You have to open a support ticket to get this fixed from Bitbucket's side.

0 votes

Hi! I checked the Bitbucket account associated to your email address but I couldn't find any repo over 2GB in size, are you referring to a different Bitbucket Cloud account? Can you share your username and repo name?



It's OK now. I could fix it thanks to the helpdesk. 

Glad to hear it's solved!

i've come accross this same question, can't be resolved, please help me ana

I am facing the same issue. how did you fix that? 

I am also facing the same issue, please help me

0 votes

Hi, I've checked your Bitbucket Cloud account but I couldn't find any repository that was extremely large, the biggest one is around 500 MB. Are you referring to a repo hosted in a different account?

Best regards,


Hello Ana,


I've been stuck with the same problem.

Got by accident commited some files that are unnecessary, tried to use the BFG, i think it worked, but i can't push the fix.


The project is not on my personal account, but on my team.


The files are:

Tierra Digital Ar.ipa
Tierra Digital

0 votes

hi i am having same issue anobody help

0 votes
todd mami I'm New Here Dec 21, 2018

I am also having the same issue.

I have reset to the commit that I want, however can't seem to be able to push it to bitbucket, any help would be appreciated.

Hi @todd mami, sorry for my late response! 

I've checked your account and seems like you have been able to sort it out? If otherwise you still need our assistance let us know and I'll be glad to help you!



todd mami I'm New Here Jan 04, 2019

Hello Ana,

Thanks for the reply yes I was able to sort it out, for future reference was there a official way to solve this issues?



Hi @todd mami, the official instructions are explained in the article Reduce repository size. In short, you need to reset back as many commits as necessary to make your repo under 2GB and then force push.

Have a good day!


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 14, 2019 in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

274 views 0 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you