开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜