Hello Bitbucket Community,
I am encountering a persistent issue with my repository identified as exceeding the 4GB size limit, despite local cleanup operations. After using BFG Repo-Cleaner and Git's garbage collection on my local system, my repository size has been significantly reduced. However, when attempting to force push these changes to Bitbucket, the push is declined due to the repository still being over the size limit.
My repository's URL is: https://bitbucket.org/<redacted>/<redacted>.git .
The exact commands I have used are as follows:
- Cloned a bare mirror of the repository:
git clone --mirror <a href="https://bitbucket.org/<redacted>/<redacted>.git" rel="noopener noreferrer" target="_blank">https://bitbucket.org/<redacted>/<redacted>.git</a>
- Used BFG to remove *.apk files:
java -jar /path/to/bfg.jar --delete-files *.apk
- Cleaned up and compacted the repository with Git:
git reflog expire --expire=now --all && git gc --prune=now --aggressive
- Attempted to force push the changes back to Bitbucket:
git push --force
The error message I receive when trying to push is as follows:
<span>remote:</span> Repository <span>is</span> over the size limit (<span>4</span> GB) <span>and</span> will <span>not</span> accept further additions.
<span>To</span> https://bitbucket.org/<redacted>/<redacted>.git
! [remote rejected] main -> main (pre-receive hook declined)
<span>error:</span> failed <span>to</span> push some refs <span>to</span> <span>'https://bitbucket.org/<redacted>/<redacted>.git'</span>
Given that my local repository size is well below 4GB following the cleanup, I believe there might be a discrepancy in how Bitbucket is calculating the repository's size. Any help on how to rectify this would be greatly appreciated. Thank you in advance for your assistance!