{
  "id": 13690412,
  "title": "How big is a Git commit? - ratfactor",
  "url": "https://urgent.news/2026/10/11/how-big-is-a-git-commit-ratfactor",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-11T09:25:42.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://ratfactor.com/cards/git-commit-size"
  },
  "original_language": "en",
  "account": "The size of a Git commit varies depending on several factors. First, Git stores objects as zlib-compressed data, so the exact size of a commit depends on the compressibility of the files involved. The more repetitive the data, the better the compression.\n\nAdditionally, Git converts object files into more efficient packfiles, which saves space by eliminating redundancy across objects. To demonstrate this, the author conducted experiments with loose objects and different scenarios:\n\n1. Committing 3 bytes of change to a file in a directory of 50 files resulted in a 17,145-byte commit.\n2. Committing 3 bytes of change to a single-file repo generated an 8,709-byte commit.\n3. Committing a 583,840-byte binary file produced a 297,873-byte commit.\n4. Committing a 16,415,223-byte source file resulted in a 1,622,188-byte commit.\n\nThese examples show that kilobytes of overhead exist even for tiny commits, with the exact amount depending on the size of the file or directory tree involved. For larger commits with a small number of files, the stored data in the .git directory is typically 50% to 10% of the uncompressed committed files, making Git extremely efficient.\n\nThe author also explored the compressed sizes of various file types, noting that binary files compress quite a bit, while text files have impressive compression as well. In summary, the size of a Git commit is highly dependent on the compressibility of the files and the efficiency gained through the use of packfiles.",
  "summary": null,
  "key_points": [
    "Git stores objects as zlib-compressed data, affecting commit size",
    "Packfiles eliminate redundancy, saving space across objects",
    "Commit size varies greatly based on file size and compressibility"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}