Is the git storage model wasteful?

前端 未结 3 1794
盖世英雄少女心
盖世英雄少女心 2020-12-18 18:16

I was reading about how git stores changes in The Git Object Model1.

It sounds like if I change one line in a file, it\'s going to re-store the entire fil

3条回答
  •  执笔经年
    2020-12-18 18:58

    Git will eventually pack everything into delta-compressed archives during the regular course of its internal maintenance, at which point this is no longer an issue.

    This isn't really an issue today though. Git's philosophy is that disk space is cheap, and it's better optimize for speed rather than storage efficiency. Chances are you'll be better served by a SCM which is twice as fast, as opposed to one which requires half the disk space.

    See the Git Book's chapter on The Packfile as well as git repack and git-pack-objects.

提交回复
热议问题