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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


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
Community Members
Community Events
Community Groups

Repo on BitBucket over limit, local has been cleaned of large files, how can I push?

My repo at BitBucket is over the 4GB. I deleted some large files on my local repo that should not have been there using BFG and also pruned and now my local repo is pretty small, but when I push I still get the 4GB limit. 

How can I get to the point where it lets me push my entire local repo? I'm the only developer on that repo so there won't be any conflicts or anything if I just overwrite the entire thing, I just don't want to delete the project. 


3 answers

1 accepted

0 votes
Answer accepted
Caroline R Atlassian Team Feb 10, 2022

Hi, @Carlos Solorzano, thank you for reaching out to Atlassian Community.

I found one repository that you have access to that was showing 5GB, so I run the GC against this repo, but the size didn’t change.

In this case, could you please tell me the last 3 letters of the name of the workspace and repository, so that I can identify it? Also, I would like to clarify if you were able to push the changes to your remote or not. If you were not, I could temporarily increase its size so you can push your changes and after that, I can run a GC on the remote repository to remove any dangling commits there, this should reduce the repo size. 

Just to give you some context around the reason your repository increased its size: when you pushed the changes with BFG, the remote repository still had the old references as well, so the GC is required on the remote repository to clean up any old references you have removed. 

I also would like to share with you that we have a feature request to allow users to mark repositories for git GC, as you can check here:

Please consider adding yourself as a watcher to receive the updates as we make progress with this. If you are not familiar with our Feature Request Policy, you can read more about it here.

Feel free to share any additional questions or concerns regarding this case. Looking forward to hearing from you. 

Kind regards,

Thank you for looking into this. The repo name starts with ends with "ter". Not sure what you mean by workspace, the project itself has the same name as the repo. 

I was never able to push the changes after using BFG, I was already over the limit. 

A little bit ago I made a different clone on my machine and followed the steps to rollback a commit and did a `push --force` of that but I don't know if that made it in, it feels like it. However after that I started getting `remote: Repository is in read only mode.` as the error. 

If you can increase the size temporarily, can I just issue a command to replace the remote repo with my local one? is `--mirror` the option to do that? There isn't anything on the remote repo that isn't on my local one. 

Also I did enable the dangling commits lab feature already a bit earlier today. 

Hi, just checking to see if there are any updates on this or anything else I should do? Thanks. 

Caroline R Atlassian Team Feb 11, 2022

Hi, Carlos! 

Thanks for the additional information. I have temporarily increased the repository size, so you can push the changes to the remote. After that, please let me know so I can run the GC in the remote repo. 

Looking forward to hearing from you. 

Kind regards,

Thank you, so that allowed me to push and the size went down but not a lot. My local copy is much smaller:


git count-objects -vH
count: 20
size: 13.13 MiB
in-pack: 101172
packs: 1
size-pack: 1.27 GiB
prune-packable: 0
garbage: 0
size-garbage: 0 bytes

Caroline R Atlassian Team Feb 14, 2022

Hi, Carlos! 

Thank you for your quick answer! I ran the GC against your repo and was able to reduce its size to 1.3 GB, which corresponds to the local size. So, as everything is working now, I changed the repository size to the original size. 

Please feel free to share any additional questions or concerns regarding this case. 

Kind regards,

Thank you much Caroline, I really appreciate the help!

Like Caroline R likes this

Now I'm getting an error:

Repository is in read only mode (over 4 GB size limit).

So it looks like I'm stuck. 

Same issue.  Was at 2.4G, used BFG to get it down to 0.5G.

Ran through the steps, did the final push, now I'm somehow over 4G!

Can't delete from the web interface, can't push.

Caroline R Atlassian Team Feb 10, 2022

Hi, David

I would like to ask if you could please create a new question for your issue, providing details on the errors you see. 

We generally encourage users to create a new question for their issue instead of posting on someone else's question, because 1) the root cause and resolution may be different for each case 2) a question can become cluttered and difficult to follow if we try to troubleshoot multiple users' issues in it.

Please feel free to let me know if you have any questions. 

Kind regards, 

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events