Loose objects, packs, sizes. Quick health check.
git count-objects reports how much disk Git is using — loose objects vs packed, garbage, and unreachables. The cheap first check before you reach for git gc or git repack.
Inventory of .git/objects/. Without -v you get loose-object count and size; with -v you get the full breakdown including packs and what's preventing pruning.
git count-objects [-v | --verbose] [-H | --human-readable]| Flag | What it does |
|---|---|
`-v` / `--verbose` | Full breakdown: count, size, in-pack, packs, size-pack, prune-packable, garbage, size-garbage. |
`-H` / `--human-readable` | Print sizes as KiB/MiB/GiB instead of raw KiB integers. |
git gc actually packed the loose objects you expected..git/objects) early.prune-packable (loose copies of packed objects) hasn't blown up.git count-objectsgit count-objects -vHgit gc && git count-objects -vgit repack -ad && git count-objects -v-v with -H — the raw KiB column is hard to read on big repos.prune-packable keeps growing, schedule git gc --prune=now (read the docs first).garbage as a signal to investigate before it spreads.objects/pack/ — reading it as total repo size is wrong.garbage includes anything Git doesn't recognise in objects/ — sometimes it's just a stale tempfile, sometimes corruption.-v output is whitespace-formatted key/value lines, not stable JSON; parsers should be defensive.Hit each option, then Check answers. Score is recorded; Next is always open.