Git Internals and Plumbing/Count loose objects

Show object counts and disk usage.

Section: Objects and Content Plumbing

Count loose objects

bash
bash
git count-objects -vH

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Objects and Content Plumbing
Write blob object
Store file content as a blob and print its object ID.
OpenIn sheetbashsame section
Write blob from stdin
Write blob content from standard input.
OpenIn sheetbashsame section
Object type
Show object type.
OpenIn sheetbashsame section
Object size
Show object size in bytes.
OpenIn sheetbashsame section
Pretty-print object
Display object content.
OpenIn sheetbashsame section
List commits and objects
Enumerate reachable objects.
OpenIn sheetbash2 tag match