You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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
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.
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.