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.
The pack sizing increase issue (after running BFG) happened to me and ended up being due to git version 2.18 era version pack issues. A coworker using 2.19 did not have the issue. I found the bug fix description in the 2.19.0 release notes - * In a recent update in 2.18 era, "git pack-objects" started producing a larger than necessary packfiles by missing opportunities to use large deltas. This has been corrected.
Have you read over this: https://github.com/rtyley/bfg-repo-cleaner/issues/68 ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Uhm I hadn't. However, on one hand, that talks only about BFG, and I used filter-branch on the second situation. On the other hand, even though it talks about probable causes, I fear I don't see solutions being proposed.
I already proceeded to use my backup repository and redirected deployment settings to use it. I mainly just want to know how can I avoid this issue in the future.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is a comment that says "I'm running into the same issue with bitbucket as well. In the comments on this page it looks like you have to email bitbucket support and request an additional git gc on your repo."
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.