SYNOPSIS
gitrepoinfo[--format=(keyvalue|nul)] [-z] [<key>…]
DESCRIPTION
Retrieve information about the repository.
THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
COMMANDS
info[--format=(keyvalue|nul)] [-z] [<key>...]-
Retrieve metadata-related information about the current repository. Only the requested data will be returned based on their keys (see "INFO KEYS" section below).
The values are returned in the same order in which their respective keys were requested.
The output format can be chosen through the flag
--format. Two formats are supported:keyvalue-
output key-value pairs one per line using the
=character as the delimiter between the key and the value. Values containing "unusual" characters are quoted as explained for the configuration variablecore.quotePath(see git-config(1)). This is the default. nul-
similar to
keyvalue, but using a newline character as the delimiter between the key and the value and using a NUL character after each value. This format is better suited for being parsed by another applications thankeyvalue. Unlike in thekeyvalueformat, the values are never quoted.-zis an alias for--format=nul.
INFO KEYS
In order to obtain a set of values from git repo info, you should provide
the keys that identify them. Here’s a list of the available keys and the
values that they return:
layout.bare-
trueif this is a bare repository, otherwisefalse. layout.shallow-
trueif this is a shallow repository, otherwisefalse. object.format-
The object format (hash algorithm) used in the repository.
references.format-
The reference storage format. The valid values are:
-
filesfor loose files with packed-refs. This is the default. -
reftablefor the reftable format. This format is experimental and its internals are subject to change.
-
EXAMPLES
-
Retrieves the reference format of the current repository:
git repo info references.format
-
Retrieves whether the current repository is bare and whether it is shallow using the
nulformat:git repo info --format=nul layout.bare layout.shallow
SEE ALSO
GIT
Part of the git(1) suite