Large Binary Files

Why Git Struggles with Large Binary Files

BookNest's designer has scanned the six book covers as PNG files of about 1.5 MB each. On the local branch experiment/covers, Sam commits them the plain way, then commits a color-corrected set:

Committing two versions of six cover scans without LFSShell
git switch -q experiment/covers
# Copy the six cover scans into public/covers/
git add public/covers && git commit -qm "Add the cover scans"
# Replace them with the designer's color-corrected scans
git commit -qam "Color-correct the cover scans"
git count-objects -vH | grep -E "^(count|size):"
git gc -q && git count-objects -vH | grep -E "^size-pack"
git switch -q main
Output
count: 321
size: 19.30 MiB
size-pack: 18.11 MiB

Twelve images made the repository 18 MiB, and git gc barely helped. Packfiles packed 20 versions of seed.json into kilobytes because text versions differ by a few bytes, but a PNG or JPEG is already compressed and a small visual change rewrites most of its bytes: zlib and deltas find nothing to share. Every version stays in history, and every clone downloads all of them. GitHub 29 also blocks files over 100 MiB.