`git fsck` prints dozens of `dangling commit ...` and `dangling blob ...` lines. Is the repo broken?
BeginnerTroubleshootingRepository Health, Size and Performance
Answer
Likely causes → No. Dangling objects are normal leftovers from amends, rebases, resets, dropped stashes and git add of content you never committed. They are unreachable but harmless and get pruned by gc after the expiry window.
Diagnose →
git fsck --no-dangling # shows only real problems
git fsck --lost-found # copies dangling commits/blobs to .git/lost-found/ for inspection
Fix → Nothing to fix. If you are looking for lost work, inspect them: git show <sha>. Otherwise let git gc clean up, or git prune --expire=now if you are sure.
Prevent → Learn the difference: "dangling" is fine, "missing", "broken link" and "corrupt" are not.
More on Repository Health, Size and Performance
`git status` takes 8–15 seconds in a large monorepo.Intermediate`error: The last gc run reported the following. Please correct the root cause and remove .git/gc.log` followed by `warning: There are too many unreachable loose objects; run 'git prune' to remove them.`IntermediateEvery few commands Git prints `Auto packing the repository in background for optimum performance.` and the machine stutters.BeginnerA fresh clone downloads 4 GB, but the checked-out files are only 200 MB.Intermediate`git gc` or `git clone` dies with `fatal: Out of memory, malloc failed (tried to allocate 1073741824 bytes)` or `error: pack-objects died of signal 9`.Advanced`error: unable to create temporary file: No space left on device` followed by `fatal: failed to write object`.Beginner