I have a project i've been working on for a few years. I was not using LFS at first in part because I did not know what the benefit was (i do now) and this has resulted in my repo becoming unnecessarily bloated. Just a few days ago I hit the 4GB size limit of the repo and was not able to push any more changes to the repo. I worked with a friend who has much more experience with git and LFS than I do to migrate the repo to LFS, and fixup the history as such, and subsequently garbage collect the repo to make it much much smaller. I am trying to push these changes to my remote but am still confronting the size limit error that prevents me from pushing
For posterity, the steps I followed were:
clone the repo
git lfs install
git lfs migrate import --fixup
add .gitattributes and update .gitignore appropriately
commit changes
git reflog expire --expire=now --all && git gc --prune=now --aggressive
and then attempted a
git push --force
And was met with the same repo size limit reached error as before
I see that someone else has had almost exactly the same issue in the past here: https://community.atlassian.com/t5/Bitbucket-questions/Not-able-to-push-even-after-reducing-the-repo-size-to-less-than/qaq-p/1865115
I am wondering if an Atlassian support member can help me in the process of pushing my updated and confirmed smaller repository to the remote depot in much the same way they did on this other community post.
Thanks for the help!
Hi @MeatRobot and welcome to the community!
I ran a git gc on the repo that was over the 4 GB limit (from the ones you have access to) and its size has been reduced to 1.9 GB, so you should be able to push your changes now.
Please keep in mind that the repo size may go up again after you push because it will contain both old (prior to history rewrite) and new references. Please feel free to let me know if it does, and I can run another git gc on the remote repo.
Kind regards,
Theodora
Thank you so much! I believe the issue is now resolved. The new pushes seem to have been successful and the repo seems to be much smaller! Thanks for the help :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I spoke too soon but now I have different issues related to how large my account's storage is which will have to be rectified another way i guess. Thanks for helping me make progress in any case
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are very welcome, please feel free to reach out if you need anything further!
With regards to storage, if you are referring to Git LFS storage, the limits are as follows:
Free plan: 1 GB Git LFS storage
Standard plan: 5 GB Git LFS storage
Premium plan: 10 GB Git LFS storage
Regardless of the billing plan, you can always purchase extra LFS storage, 100 GB for $10 per month.
You can find more details on this page:
Please feel free to let me know if you have any questions.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.