hello,
I'm new here, and a new employee from a company,
I have a question about repo size, this repo detected over 500MB, since I know the real size should be not over 60MB
I run this command
$ git count-objects -vH
count: 0
size: 0 bytes
in-pack: 2278
packs: 1
size-pack: 151.88 MiB
prune-packable: 0
garbage: 0
size-garbage: 0 bytes
$ du -sh *
165M node_modules
4.0K package.json
428K pages
50M public
136K src
8.0K styles
148K yarn.lock
I know the node_modules there should be ignored.
and I know before I come here .next folder was incidentally committed by the legacy team. and it's already been cleanup by me and added to .gitignore.
also, I read several articles from community.atlassian.com , or here specific topic about repo size, and mostly the solving is from Atlassian Team, can you please fix my repo size by run git gc too?
thanks
Hello @Poby Zaarif and welcome to the Community!
I went ahead and triggered a GC on your repository to remove any dangling objects that might have been left from your cleanup. The git GC reduced the repository size back to 234.8MB!
Now that GC is completed, I would highly recommend you having everyone on your team removing their old copies of the repository and doing a fresh clone of it. Since the old clones have a dirty history, it's better to delete them, so you don't risk pushing the dangling objects back into your cleaned repository, which would increase its size again.
If you would like to reduce the size further, I would suggest following the steps outlined in the following article :
Please note that to remove a previously committed large file(s) from your repository you might need to rewrite the history with a tool such as BFG (see How to remove files from commit history).
Thank you, @Poby Zaarif !
Patrik S
thank you for helping us @Patrik S
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.