We accidentally uploaded file of 2.5 GB which exceed limit of 4GB because our repo is already large enough ( more than 2 GB ).
To fix that issue, I tried hard reset in my local system then force pushed over git repo.
Now, I'm not able to push anything.
I think the only thing I have my hope on to run the garbage collector. Can you please help me?
PS: Every suggestion really appreciated by me.
Thanks in advance.
Hi @sunnytecho and welcome to the community!
I found one repo over the 4 GB limit from the ones you have access to. I ran a git gc on it and its size is 2.1 GB now.
Could you please let me know if you can see the update size now and if you are able to push?
Kind regards,
Theodora
Hey Theodora,
Thanks for your help. 🙏
But, unfortunately I tried to send updates and it's again turned into 4.3 GB
I do have that commit in my local system.
I removed that commit then run git gc in my local system.
Any chances do you run that command again?
Thanks in advance?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @sunnytecho,
You are very welcome and of course. I ran another git gc, but I'm afraid the repo's size hasn't been reduced.
If you open the repo on Bitbucket Cloud website and check its Commits, do you see there the commit with the large file?
If so, is it the last commit on a branch?
Or have you pushed additional commits after the large one?
Has this branch (with the large commit) been merged into any other branches?
I am asking because I don't have access to your repo's content.
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.
Thanks Theodora,
Unfortunately, It's not a last commit. I did add few other important changes in different commits.
It's also available in other branches as well on my local system which is no longer useful for me.
But, master branch is one which have this large file in local system and bitbucket server.Unfortunately, It's not a last commit. I did add few other important changes in different commits.
It's also available in other branches as well on my local system which is no longer useful for me.
But, master branch is one which have this large file in local system and bitbucket server.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @sunnytecho,
If the commit with the large file still exists in the Bitbucket Cloud repo and if you have added more commits after that, I would suggest using BFG to rewrite history and remove the large file from the repo's history:
That link includes step-by-step instructions on how to use BFG as well as examples. If there is one large file that you want to remove, you can use BFG with the argument --delete-files (example included in the link).
A few things to note:
If you have any questions, please feel free to let me know.
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.