Verify a Repository With git fsck
Check for missing, corrupt or dangling objects in the object database.
Run git fsck --full to verify all objects and connectivity.
01Command
Command
$ git fsck --full02What it does
fsck walks the object graph and reports corrupt or unreachable objects, which is the right check after a disk error, an interrupted transfer or before trusting a backup. It is the command-line equivalent of an integrity audit.
03Risk
!Warning: Dangling objects are usually harmless leftovers; investigate missing or corrupt objects promptly and restore from a known-good backup.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- git-fsck documentationEvidence: Documents git fsck, which verifies connectivity and validity of objects.
Last verified: 2026-10-13 · Category: Developer
06Related solutions
List Local Time Machine Snapshots with tmutil
See every local APFS Time Machine snapshot on your startup disk and delete ones you no longer need.
Clone Folders with Full macOS Metadata Using ditto
The copy command that keeps Finder flags, ACLs, resource forks, and exact permissions intact.
Export and Import Preference Domains with defaults
Snapshot an entire app's settings to a plist file, then restore or migrate it later.