Newer porcelain-ish helper for repo metadata.
git repo is a newer porcelain-ish helper that prints structured repository metadata. It replaces ad-hoc grepping of git config --list and friends.
Think of it as a typed accessor over repo facts: hash algorithm, ref format, bare/shallow/partial state. You ask for atoms, you get values - no parsing.
git repo info [--format=<keyvalue|nul>] [<key>...]
Atoms include:
references.format # files | reftable
layout.bare # true | false
layout.shallow # true | false
object.format # sha1 | sha256
| Flag | What it does |
|---|---|
--format=<fmt> | Output format: keyvalue (default) or nul (NUL-separated) |
info <key>... | Subcommand: print one or more named info atoms |
references.format | Atom: ref backend (files vs reftable) |
layout.bare | Atom: whether the repo is bare |
layout.shallow | Atom: whether the repo has a shallow boundary |
object.format | Atom: hash algorithm (sha1/sha256) |
git repo info layout.bare references.formatgit repo info references.formatgit repo info layout.bare layout.shallow object.formatgit repo info --format=nul references.formatgit repo info layout.bare # vs git config --bool core.bareHit each option, then Check answers. Score is recorded; Next is always open.