A few weeks ago I saw the size was at around 800mb (we store the content of several sites in a single repo for management purposes). So, I ran BFG to clean it up and did a push force, pretty much just like in the documentation I found here
https://confluence.atlassian.com/bitbucket/reduce-repository-size-321848262.html
Now, I proceeded to check... my local repo got much smaller but the size reported at bitbucket didn't change.
Since it was far from 1gb and I was busy, I decided I had to prioritize other issues.
Now, today I checked and the size was 1.8gb! Only around 10 websites had been added since, and the total size was only a few megabytes (no more than 50mb), yet the repo got 1gb bigger.
So, I decided to run filter-branch command this time.
Since we store our sites by date and currently no websites from 2017 or older are being deployed to production (and they have been deleted with git rm already), I ran:
git filter-branch --tree-filter 'rm -rf 2017' --prune-empty HEAD
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d
git gc --prune=now
git push --all --force
And then proceeded to check the repo size... yet this time is shows 2.2GB? What? Why? Now it got into read-only mode, even though I have been trying to keep it under control, following your own documented proceedures.
Not being able to push into this repository is a big problem for me. I did back up the last with --mirror, so I will apply some urgent settings, but I don't understand why this happened and I really want to avoid this from happening ever again.