Not able to push even after reducing the size of project to less than 4GB

Oan Muhammad
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 28, 2024

Pushed build file in multiple commits in one branch and now i want to delete the that file, so i used BFG Tool to delete the file but i cannot delete that from remote repository, Seeing this below error and with help of  BFG Tool, I reduced the size to less than 4GB and still I am not able to push.

$ git push --force
Enumerating objects: 2669, done.
Counting objects: 100% (104/104), done.
Writing objects: 100% (2669/2669), 386.78 MiB | 2.36 MiB/s, done.
Total 2669 (delta 104), reused 104 (delta 104), pack-reused 2565 (from 1)
remote: Resolving deltas: 100% (1717/1717), completed with 51 local objects.
remote: Repository is over the size limit (4 GB) and will not accept further additions. remote: remote: Learn how to reduce your repository size: https://support.atlassian.com/bitbucket-cloud/docs/reduce-repository-size/#Rewind-history-to-undo-large-commits. To <url> ! [remote rejected] phase2.0 -> phase2.0 (pre-receive hook declined) error: failed to push some refs to <url>


After running git count-objects -vH

$ git count-objects -vH count: 0 size: 0 bytes in-pack: 3765 packs: 1 size-pack: 397.44 MiB prune-packable: 0 garbage: 0 size-garbage: 0 bytes

 

1 answer

1 accepted

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 30, 2024

Hi @Oan Muhammad and welcome to the community!

I saw one repo over the 4 GB limit from the ones you have access to. I ran a garbage collection on it, and its size has been reduced to 1.8 GB. Can you please try pushing your changes now?

Please keep in mind that the repo's size may go up again after you push, because the remote repo will have both old refs (before history rewrite) and new refs (after history rewrite). Please let me know after you push, and I can run another git gc on the repo so that the old refs get removed.

Kind regards,
Theodora

Oan Muhammad
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 30, 2024

Hi Theodora, thank you so much for running gc, I finally pushed the changes you can run another gc.

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 31, 2024

Hi Oan,

You are very welcome and thank you for the update. I ran another git gc and the repo's size has been reduced further to 44.2 MB.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events