Dear Team,
Seeing this below error and with help of BFG Tool, we reduced the size to less than 4GB and still we are not able to push. Kindly help us with the issue .
# git push origin master --force
Password for '<url removed>':
Counting objects: 37664, done.
Delta compression using up to 6 threads.
Compressing objects: 100% (19342/19342), done.
Writing objects: 100% (37435/37435), 666.10 MiB | 22.23 MiB/s, done.
Total 37435 (delta 23393), reused 31633 (delta 18032)
remote: Resolving deltas: 100% (23393/23393), completed with 144 local objects.
remote: Checking connectivity: 36064, done.
remote: Repository is over the size limit (4 GB) and will not accept further additions.
remote:
remote: Learn how to reduce your repository size: https://confluence.atlassian.com/x/xgMvEw.To
<url removed>
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to
<url removed>
Hi Lalith,
Since you have already reduced your repo size locally with BFG, I went ahead and temporarily increased the repo size limit, so you can push your changes.
After you do, the repo's size will get increased again, because the Bitbucket repo will contain both old refs (prior to history rewrite) and the new ones. Please feel free to let me know after you make this push, and I can then run a git gc so that the old refs get removed, and the remote repo's size should get reduced.
Just to give you some context on why the automated git gc did not run for your repo:
When a repo is over the size limit, the only thing that can be pushed is a git reset that undoes the latest large commits, you can find more details in our documentation here:
If you enable the Labs feature Delete dangling commits when over size limit and follow the steps on this guide, a git gc should get triggered for the repo automatically. The git gc will not get triggered if you push anything else, like history rewrite with BFG.
Just a heads up, I removed the repo url from your post to protect your privacy.
If you have any questions, please feel free to let me know.
Kind regards,
Theodora
Hi Theodora ,
Thanks much for the detailed and clear explanation of the scenario.
We have pushed successfully now , Kindly help us with running gc.
Also the repo quota we had is 4GB and now it shows 2GB , Will our Repo Quota remain as 4GB ?
Thank you for the support
-Lalith
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lalith,
I ran a git gc for the repo, its size is 2 GB now. Does this agree with the size of your local repo?
You can check that by running
git count-objects -Hv
in the local mirror clone where you executed BFG, the repo's size should be the sum of the fields size and size-pack.
The repo size limit should be 4 GB at the moment as I removed the higher limit that I previously set in order for you to push. I'm not sure if the limit was showing different to you because of the temporary change I made.
Do you still see a different limit now and are you able to push to the repo?
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Wow, Awesome! Thanks a lot Theodora. In my local the repo size was around ~1.5GB though. The warning messages are gone now! Will try pushing with our changes.
Quite detailed and informative response provided. Thanks again for unblocking us.
-Lalith
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Wierdly , the size of repo increased to 6.83GB from 4.03GB even without any commits. Can Atlassian Team help please ?
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.