Check repository object counts and size details.
Section: Safety and Maintenance
Inspect loose objects and packing state
bash
bash
git count-objects -vHExplanation
Useful during repository maintenance and when reasoning about how much potentially recoverable loose object data exists.
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 Safety and Maintenance
Set default reflog retention
Customize how long normal reflog entries are retained.
Set unreachable reflog retention
Control retention for entries that are no longer reachable.
Run aggressive pruning now
Force garbage collection and immediate pruning.
Preview reflog expiration impact
See what would be pruned from reflog without changing anything.
Restore branch to a reflog entry
Move the current branch back to a previous recorded state.