This is an old revision of the document!
Overview
Using git fsck to display dangling and unreachable objects.
SYNOPSIS
git fsck [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]
[--[no-]full] [--strict] [--verbose] [--lost-found]
[--[no-]dangling] [--[no-]progress] [--connectivity-only]
[--[no-]name-objects] [<object>*]
OPTIONS
In part:
<object>
An object to treat as the head of an unreachability trace.
If no objects are given, git fsck defaults to using the
index file, all SHA-1 references in refs namespace, and all
reflogs (unless --no-reflogs is given) as heads.
--unreachable
Print out objects that exist but that aren’t reachable from
any of the reference nodes.
--[no-]dangling
Print objects that exist but that are never directly used
(default). --no-dangling can be used to omit this
information from the output.
--unreachable overrides --no-dangling.