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: Learn how to reduce your repository size: https://confluence.atlassian.com/x/xgMvEw.To
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to
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.
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?
Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events