git-fsck
Verify the validity and connectivity of nodes in a Git repository index. tldr-pages
On several platforms
Several platforms
Verify the validity and connectivity of nodes in a Git repository index. Note: Does not make any modifications.
Check the current repository
git fsckIdentifyList all tags found
git fsck --tagsIdentifyList all root nodes found
git fsck --rootIdentifyShow all unreachable and dangling objects, ignore reflogs, and perform a full integrity check
git fsck --dangling --no-reflogs --unreachable --fullIdentifyCheck connectivity only (skip object integrity verification)
git fsck --connectivity-onlyIdentify