You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hello,
Same issue here, I ran a bfg clean up to reduce size, and now i'm unable to push the changes because the size is over 4gb, I have the auto gc enabled but still nothing reduced.
Could you check please? the last two letters of the repo are "al"
Best regards
Hi @Xtend,
I ran a git gc for your repo and although its size has been reduced, it is still over the 4 GB limit.
Since you have reduced the repo's size locally, I have temporarily increased the repo size limit to 5 GB so you can push your changes.
Please note that when you push these changes the repo size will most likely get increased again because the remote repo will contain both old references (prior to history rewrite) and new ones (after history rewrite).
Another git gc will be needed on the remote repo to have the old references removed. Please let me know when you push and I can run another git gc for the repo.
Just a heads up, I moved your post to a new question. It's best to create a new question if you need assistance with a certain issue as a new question will have better visibility to the rest of the Atlassian team if I'm out of office, and also because a post can become difficult to follow if we work on multiple users' issues in that post.
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.
Hi @Xtend,
I ran another git gc for the repo, but its size is still over 4 GB.
Could you please let me know
1. What is the output of the following command in the local clone where you executed BFG?
git count-objects -Hv
2. Did you run BFG in a mirror clone of the repo?
3. If you take a mirror clone of the repo now
git clone --mirror <repo url>
and then navigate to the directory of that mirror clone, what is the output of git count-objects -Hv in that directory?
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.
Hi Theodora,
thank you for your time.
On the mirror clone:
$ git count-objects -Hv
count: 0
size: 0 bytes
in-pack: 35825
packs: 3
size-pack: 4.48 GiB
prune-packable: 0
garbage: 0
size-garbage: 0 bytes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Xtend,
Thank you for your reply.
Since the size in the mirror clone shows the repo to be over 4 GB, the push you did earlier did not reduce the remote repo's size.
Please note that I have changed the repo's size limit back to 4 GB.
I would suggest checking this reply of mine to a different post with steps on how to identify large files and reduce the repo's size:
If you use BFG to remove certain files, please make sure that you run it in a mirror clone of your repo, and also that your latest commit is clean with none of the undesired data in it.
Step-by-step instructions for BFG, along with some examples, can be found here:
After you follow all the steps of running BFG, you can check the size of the mirror clone where you ran it with git count-objects -Hv, to confirm if it is below 4 GB.
Please let me know then, and I can temporarily increase the repo size limit again so you can push your changes.
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.
I already did the BFG clean up and it has still more than 4GB...
If I remove all git references manually, the size is 2.6Gb ( you can check the new repo with suffix "_New") it's a copy of the old without ref
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Xtend,
Even though I can see the repo's size, I cannot view its content.
A repo's size may be large because it has large/binary files, or because it has a lot of references or a combination of those.
Do you version any large and/or binary files in the repo?
You can use the following command in a clone of the repo to see its files and their respective size:
git rev-list --objects --all \
| git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \
| sed -n 's/^blob //p' \
| sort --numeric-sort --key=2 \
| cut -c 1-12,41- \
| $(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest
If you see any large/binary files and you need to version them, then you may want to consider tracking them with Git LFS.
We have the following guide on how to migrate files to Git LFS in an existing repo:
Files tracked with Git LFS do not count towards the repository size, so the repo's size should get reduced.
Git LFS files count towards the workspace's LFS storage.
Workspaces on the free plan have 1 GB of Git LFS, but you can purchase additional LFS storage if you need it. You can find more details on billing plans and the available LFS storage here:
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.