GIT-DIAGNOSE(1)
π GIT-DIAGNOSE π
okay so bestie, welcome to git-diagnose β the part of the Git manual (that's git-diagnose(1) if we're being formal) where Git basically makes a little scrapbook of everything going on with your machine π
β¨ SYNOPSIS β¨
git diagnose [(-o | --output-directory) <path>] [(-s | --suffix) <format>]
[--mode=<mode>]
πΈ DESCRIPTION πΈ
So here's the vibe: git diagnose goes around collecting detailed information about the user's machine, the Git client, and the current repository state, and then it packages all of that up into a zip archive. Iconic. Then you can, like, share the generated archive with the Git mailing list to help debug an issue, or just keep it as a reference for doing your own independent debugging. Main character debugging energy fr fr π¦
By default, here's the information that gets captured in the archive:
git version --build-options- The path to the repository root
- The available disk space on the filesystem
- The name and size of each packfile, including those in alternate object stores
- The total count of loose objects, as well as counts broken down by
.git/objectssubdirectory
You can collect additional information by selecting a different diagnostic mode using the --mode option β¨
Also important, bestie β this tool differs from git-bugreport(1) in that it collects much more detailed information, with a greater focus on reporting the size and data shape of repository contents. Like, bugreport is cute but diagnose is thorough π
π OPTIONS π
-o<path>,--output-directory<path> β puts the resulting diagnostics archive in <path> instead of the current directory. Very "I have a folder for this" of you π«Ά-s<format>,--suffix<format> β lets you specify an alternate suffix for the diagnostics archive name, so you get a file namedgit-diagnostics-<formatted-suffix>. This should take the form of astrftime(3)format string, and the current local time will be used. Cute timestamped archive, we love to see it β--mode=(stats|all)β specifies the type of diagnostics that should be collected. The default behavior ofgit diagnoseis equivalent to--mode=statsβ¨
The --mode=all option collects everything included in --mode=stats, as well as copies of .git, .git/hooks, .git/info, .git/logs, and .git/objects/info directories.
π¨ okay so listen β this additional information may be sensitive, because it can be used to reconstruct the full contents of the diagnosed repository. Users should exercise caution when sharing an archive generated with --mode=all. Like, do NOT just drop that in the group chat, bestie π think before you share π
π GIT π
Part of the git(1) suite π
and that's the whole page, bestie π§ this gorgeous little manual is from Git 2.56.0, dated 2026-09-27 β slay, go diagnose something π
π¦ where this page comes from
- arch rolling: git 2.56.0-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms