Dear Community,
lately the warning saying that my repository size is over 1GB has been jumping anytime I access bitbucket.
Then I followed the instructions given by the link:
https://confluence.atlassian.com/bitbucket/reduce-repository-size-321848262.html
I tried by using the git filter-branch to rewrite history, but everytime I try deleting a file by name then I followed the Garbage collecting dead data instructions but after all if I list again the big files in my repo by running the git_find_big.sh script the file is still there and I am still getting the warning.
The thing is that I am still getting the warning but when I run
git count-objects -Hv
It says that the repo is only 600 MiB (before was 1.3GB)
The Whole history rewriting is taking like an hour or so, and I when I push I am pushing a thousands of commits therefore I guess I am doing the right thing but I am not sure, could anyone give me hint?
Thanks in advance
Hi Nico!
Are you sure you've removed that big file from all the commits where it appears?
Also, could you let us know the name of the repo so we can have a look?
Kind regards,
Ana
The repo is uphillgmbh/fanpagekarma
After removing files again, we now see the size of the project went down to 576MB, can you confirm that size?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've checked the size on the remote and I can also see 708 MB, is not exactly the same as what you showed, but it could be caused by some changes you added recently, new references, etc . Is there anything else we can help you with?
Cheers!
Ana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your reply. We still working on this, but it seems we already reduced the size a bit...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We are trying same case here for our repo, but its not helping at all. We have cleaned up 200MB file & have run rewrite history. But its not reducing the size. Are we doing something wrong here?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Mahender.Bogi , I've checked your account and I couldn't find any big repo. Can you let us know the name of the repo you're referring to?
Also, you said you've run rewrite history, can you tell us which command you ran exactly?
Cheers,
Ana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ana,
We followed below commands
1. forked new repo <repository-url>
2. removed the file 193MB zip file and committed but not pushed as mentioned
3. ran the bfg delete file
$ java -jar bfg.jar --delete-files <200mbfilename>
4. ran below command
$ git -c gc.auto=1 -c gc.autodetach=false -c gc.autopacklimit=1 -c gc.garbageexpire=now -c gc.reflogexpireunreachable=now gc --prune=all
5. pushed the changes by below command
$ git push --all --force && git push --tags --force
after push the changes.
6. I raised a ticket to run the serverside GC cleanup. after serverside GC cleanup completes size is not reducing.
please let me know what step i am missing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ana,
Please check the repository under hostanalytics account. And praveen above mentioned the steps we did.
Appreciate your help here.
Thanks,
-Mahender
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ana,
our project again show a size bigger than 2GB.
Running git count-objects -Hv shows the following results:
count: 2334
size: 169.12 MiB
in-pack: 188303
packs: 48
size-pack: 633.48 MiB
prune-packable: 38
garbage: 0
size-garbage: 0 bytes
Could you please run the GC on our repo: uphillgmbh/fanpagekarma
Thanks in advance
Nicolas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nicolas!
I've just checked and the repo size is ~740MB, which looks about right. Seems like the garbage collection was run automatically before I could see your message.
Let us know if you need anything else,
Ana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Ana,
thanks! Yes, it looks like that happend.
Could you give me some insights why a repository can grow from 1GB to 2GB within a day, if the size itself is about 740 MB?
Thanks again
Nicolas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ana,
our project again show a size close to 2GB.
Running git count-objects -Hv shows the following results:
count: 1498
size: 11.55 MiB
in-pack: 205417
packs: 47
size-pack: 812.75 MiB
prune-packable: 92
garbage: 0
size-garbage: 0 bytes
Could you please run the GC on our repo: uphillgmbh/fanpagekarma
Thanks in advance
Nicolas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nicolas, the size is back down again. It is possible that whatever large object is causing the huge spike in memory is still in the git history of someone pushing to the repository.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tyler,
thanks for your feedback. We suspect that the GC just does not run often enough, and it's better immediately afterwards. Without any change from our side.
Best
Nicolas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tyler,
our project again show a size close to 2GB.
Running git count-objects -Hv shows the following results:
count: 18586
size: 138.18 MiB
in-pack: 255546
packs: 546
size-pack: 934.82 MiB
prune-packable: 999
garbage: 2
size-garbage: 198.97 MiB
Could you please run the GC on our repo: uphillgmbh/fanpagekarma ?
Thanks in advance
Nicolas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Team,
our project again show a size close to 2GB.
Running git count-objects -Hv shows the following results:
count: 3594
size: 21.14 MiB
in-pack: 303254
packs: 168
size-pack: 875.38 MiB
prune-packable: 286
garbage: 2
size-garbage: 198.97 MiB
Could you please run the GC on our repo: uphillgmbh/fanpagekarma ?
Thanks in advance
Nicolas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nico Kanitz done!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Team,
our project again show a size close to 2GB.
Running git count-objects -Hv shows the following results:
count: 6672
size: 47.82 MiB
in-pack: 320404
packs: 304
size-pack: 913.43 MiB
prune-packable: 625
garbage: 2
size-garbage: 198.97 MiB
Could you please run the GC on our repo: uphillgmbh/fanpagekarma ?
Thanks in advance
Nicolas
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Nico Kanitz,
I've run git gc on your repo and the size has decreased to 836.1 MB.
Have a good day! :)
Ana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Team,
our project again show a size close to 2GB.
Running git count-objects -Hv shows the following results:
count: 10010
size: 74.53 MiB
in-pack: 333074
packs: 471
size-pack: 955.34 MiB
prune-packable: 928
garbage: 2
size-garbage: 198.97 MiB
Could you please run the GC on our repo: uphillgmbh/fanpagekarma ?
Thanks in advance
Nicolas
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.
Hi @Nico Kanitz
Looks like GC ran automatically 15 hours ago.. I see the size as 941.6 MB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.