'\" t .\" Title: git-repo .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 2026-06-29 .\" Manual: Git Manual .\" Source: Git 2.55.0 .\" Language: English .\" .TH "GIT\-REPO" "1" "2026\-06\-29" "Git 2\&.55\&.0" "Git Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" git-repo \- Retrieve information about the repository .SH "SYNOPSIS" .sp .nf \fBgit\fR \fBrepo\fR \fBinfo\fR [\fB\-\-format=\fR(\fBlines\fR|\fBnul\fR) | \fB\-z\fR] [\fB\-\-all\fR | \fI\fR\&...] \fBgit\fR \fBrepo\fR \fBinfo\fR \fB\-\-keys\fR [\fB\-\-format=\fR(\fBlines\fR|\fBnul\fR) | \fB\-z\fR] \fBgit\fR \fBrepo\fR \fBstructure\fR [\fB\-\-format=\fR(\fBtable\fR|\fBlines\fR|\fBnul\fR) | \fB\-z\fR] .fi .sp .SH "DESCRIPTION" .sp Retrieve information about the repository\&. .sp THIS COMMAND IS EXPERIMENTAL\&. THE BEHAVIOR MAY CHANGE\&. .SH "COMMANDS" .PP \fBinfo\fR [\fB\-\-format=\fR(\fBlines\fR|\fBnul\fR) | \fB\-z\fR] [\fB\-\-all\fR | \fI\fR\&.\&.\&.] .RS 4 Retrieve metadata\-related information about the current repository\&. Only the requested data will be returned based on their keys (see "INFO KEYS" section below)\&. .sp The values are returned in the same order in which their respective keys were requested\&. The \fB\-\-all\fR flag requests the values for all the available keys\&. .sp The output format can be chosen through the flag \fB\-\-format\fR\&. Two formats are supported: .PP \fBlines\fR .RS 4 Output key\-value pairs one per line using the \fB=\fR character as the delimiter between the key and the value\&. Values containing "unusual" characters are quoted as explained for the configuration variable \fBcore\&.quotePath\fR (see \fBgit-config\fR(1))\&. This is the default\&. .RE .PP \fBnul\fR .RS 4 Similar to \fBlines\fR, but using a newline character as the delimiter between the key and the value and using a \fINUL\fR character after each value\&. This format is better suited for being parsed by another applications than \fBlines\fR\&. Unlike in the \fBlines\fR format, the values are never quoted\&. .sp \fB\-z\fR is an alias for \fB\-\-format=nul\fR\&. .RE .RE .PP \fBinfo\fR \fB\-\-keys\fR [\fB\-\-format=\fR(\fBlines\fR|\fBnul\fR) | \fB\-z\fR] .RS 4 List all the available keys, one per line\&. The output format can be chosen through the flag \fB\-\-format\fR\&. The following formats are supported: .PP \fBlines\fR .RS 4 Output the keys one per line\&. This is the default\&. .RE .PP \fBnul\fR .RS 4 Similar to \fBlines\fR, but using a \fINUL\fR character after each value\&. .RE .RE .PP \fBstructure\fR [\fB\-\-format=\fR(\fBtable\fR|\fBlines\fR|\fBnul\fR) | \fB\-z\fR] .RS 4 Retrieve statistics about the current repository structure\&. The following kinds of information are reported: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Reference counts categorized by type .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Reachable object counts categorized by type .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Total inflated size of reachable objects by type .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Total disk size of reachable objects by type .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Largest reachable objects in the repository by type .sp The output format can be chosen through the flag \fB\-\-format\fR\&. Three formats are supported: .PP \fBtable\fR .RS 4 Outputs repository stats in a human\-friendly table\&. This format may change and is not intended for machine parsing\&. This is the default format\&. .RE .PP \fBlines\fR .RS 4 Each line of output contains a key\-value pair for a repository stat\&. The \fI=\fR character is used to delimit between the key and the value\&. Values containing "unusual" characters are quoted as explained for the configuration variable \fBcore\&.quotePath\fR (see \fBgit-config\fR(1))\&. .RE .PP \fBnul\fR .RS 4 Similar to \fBlines\fR, but uses a \fINUL\fR character to delimit between key\-value pairs instead of a newline\&. Also uses a newline character as the delimiter between the key and value instead of \fI=\fR\&. Unlike the \fBlines\fR format, values containing "unusual" characters are never quoted\&. .sp \fB\-z\fR is an alias for \fB\-\-format=nul\fR\&. .RE .RE .RE .SH "INFO KEYS" .sp In order to obtain a set of values from \fBgit\fR \fBrepo\fR \fBinfo\fR, you should provide the keys that identify them\&. Here\(cqs a list of the available keys and the values that they return: .PP \fBlayout\&.bare\fR .RS 4 \fBtrue\fR if this is a bare repository, otherwise \fBfalse\fR\&. .RE .PP \fBlayout\&.shallow\fR .RS 4 \fBtrue\fR if this is a shallow repository, otherwise \fBfalse\fR\&. .RE .PP \fBobject\&.format\fR .RS 4 The object format (hash algorithm) used in the repository\&. .RE .PP \fBreferences\&.format\fR .RS 4 The reference storage format\&. The valid values are: .PP \fBfiles\fR .RS 4 for loose files with packed\-refs\&. This is the default\&. .RE .PP \fBreftable\fR .RS 4 for the reftable format\&. .RE .RE .SH "EXAMPLES" .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Retrieves the reference format of the current repository: .sp .if n \{\ .RS 4 .\} .nf git repo info references\&.format .fi .if n \{\ .RE .\} .sp .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Retrieves whether the current repository is bare and whether it is shallow using the \fBnul\fR format: .sp .if n \{\ .RS 4 .\} .nf git repo info \-\-format=nul layout\&.bare layout\&.shallow .fi .if n \{\ .RE .\} .sp .RE .SH "SEE ALSO" .sp \fBgit-rev-parse\fR(1) .SH "GIT" .sp Part of the \fBgit\fR(1) suite