I have a problem with my repo. My repository has grown more in size after I trie the BFG Method and it grew even bigger (1.85 GB). A manual git gc would be helpful. I fear if I try this Method again that my repo will go over the 2 GB and wont except my git commands.
You are right that when you rewrite history and push to the Bitbucket repo, a git gc is needed on the remote repo for the old references to get removed and for the repo's size to get reduced.
I checked your Bitbucket Cloud account in our system, I found which repo from the ones you have access to has a size of 1.8 GB, and I ran a git gc on it. Its size is now 197.2 MB.
Please feel free to let me know if things are ok now and if you have any further questions.
You are very welcome!
If the repo size increased after a push that included history rewrite, this is expected. In this case, the remote repo contains both old references (prior to history rewrite) and the new ones, which is why its size gets increased. A git gc is needed on the remote repo for the old refs to get removed and for the repo's size to get reduced.
I'm not sure if you also rewrote history and pushed the first time that the increase in size happened?
Another possible reason for the increase in size might be a bug we have, where the garbage file in the repo is sometimes counted in the repo size:
However, since the issue is no longer occurring now, I'm afraid it's hard to say what was the case the first time this occurred.
Have you deleted files from you repo? If so you'll have to purge the files from the history to reduce the size.
Atlassian has a guide here to reduce the size of the repo.
Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...
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