How to force garbage collection on a remote bitbucket repository
I had some garbage data in my local and remote bit-bucket repository. Initially, I ran this approach but it did not find any large files.
Then I used the following which reduced the size of my local repo from 1.8GB to a 266 kB. I did forced push. However, the size of the remote repo is still 1.8 GB.
git -c gc.reflogExpire=0 -c gc.reflogExpireUnreachable=0 -c gc.rerereresolved=0 \ -c gc.rerereunresolved=0 -c gc.pruneExpire=now gc "$@"
Taken from: How to remove unreferenced blobs from my git repo
I tried different approaches but its of no use. For example, this one did not work too.
How to cleanup garbage in remote git repo
The possible cause for this big garbage might have been a large binary file which I committed to the report a few days ago. I removed it through a hard reset by deleting that commit.
For now, I just deleted the repository on bitbucket and pushed the local backup which solved the problem. However, there should be a better option for it. Any solutions?
One Solution collect form web for “How to force garbage collection on a remote bitbucket repository”
If the remote server is rejecting your pushes because your repo is too big, then you need to talk to the people who run the remote server. Open a support ticket.