git fsck
all
Verify the validity and connectivity of nodes in a Git repository index. Note: Does not make any modifications. See also: `git gc`.
More info →Examples (5)
Check the current repository
List all tags found
git fsck --tagsList all root nodes found
git fsck --rootShow all unreachable and dangling objects, ignore reflogs, and perform a full integrity check
git fsck --dangling --no-reflogs --unreachable --fullCheck connectivity only (skip object integrity verification)
git fsck --connectivity-onlymade by @shridhargupta | data from tldr-pages