My Git objects pack folder is very heavy (after push --force)
I use Git and needed to send many many...
git init .
...
git push --force
.. to the same branch of a remote repo.
Now my .git/objects/pack is 168MB heavy for a 25MB app.
Can anyone explain me which mecanism packs objects -- is it automated when r开发者_运维知识库emote recieves a forced push ?
Is it dangerous for the Git repo integrity to delete that packs or are they just backup files in this case ?
If this mecanism is automated, how can I delete theses packs in the remote repo (I only can do pushes)
Thanks !
There is no way to force the remote repository to do a garbage collection without having more access to that git folder. If you do have access, git prune
will do a forceful removal of all unreachable objects. I would follow it with a git gc
. You can also use the --prune
option to the GC command.
精彩评论