Progress:
TIER 2 · MODULE 17· Intermediate

git diagnose

Newer than bugreport. More artifacts.

🎯 What & why

git diagnose bundles a zip archive of repo diagnostics: object counts, packed-refs sizes, alternates, hooks, config. It is the modern successor to git bugreport for when you need to hand evidence to upstream maintainers.

🧠 Mental model

Think 'support bundle' for a Git repo: one zip with everything a maintainer needs to see what your repo looks like, without you having to ship the whole thing.

🛠️ Synopsis

git diagnose [-o <output-directory>] [-s <suffix>]
                  [--mode=(stats|all)]

🎚️ Switches & options

FlagWhat it does
-o, --output-directory <dir>Where to drop the zip (default: current dir)
-s, --suffix <suffix>Custom filename suffix (replaces the default timestamp)
--mode=statsDefault: counts, sizes, config, hooks list - no object payloads
--mode=all⚠️ Includes packed-refs and reachable-pack contents - can leak data

💡 Use cases

🧪 Examples

Default stats dump
git diagnose
Drop into /tmp
git diagnose -o /tmp
Custom suffix
git diagnose -s broken-fetch-2026
Full mode (careful)
git diagnose --mode=all -o /tmp

🎓 Recommendations

🪤 Common pitfalls

🔗 Related modules

📝 Quiz

Hit each option, then Check answers. Score is recorded; Next is always open.