Git fork
1git-repo(1)
2===========
3
4NAME
5----
6git-repo - Retrieve information about the repository
7
8SYNOPSIS
9--------
10[synopsis]
11git repo info [--format=(keyvalue|nul)] [-z] [<key>...]
12
13DESCRIPTION
14-----------
15Retrieve information about the repository.
16
17THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
18
19COMMANDS
20--------
21`info [--format=(keyvalue|nul)] [-z] [<key>...]`::
22 Retrieve metadata-related information about the current repository. Only
23 the requested data will be returned based on their keys (see "INFO KEYS"
24 section below).
25+
26The values are returned in the same order in which their respective keys were
27requested.
28+
29The output format can be chosen through the flag `--format`. Two formats are
30supported:
31+
32`keyvalue`:::
33 output key-value pairs one per line using the `=` character as
34 the delimiter between the key and the value. Values containing "unusual"
35 characters are quoted as explained for the configuration variable
36 `core.quotePath` (see linkgit:git-config[1]). This is the default.
37
38`nul`:::
39 similar to `keyvalue`, but using a newline character as the delimiter
40 between the key and the value and using a NUL character after each value.
41 This format is better suited for being parsed by another applications than
42 `keyvalue`. Unlike in the `keyvalue` format, the values are never quoted.
43+
44`-z` is an alias for `--format=nul`.
45
46INFO KEYS
47---------
48In order to obtain a set of values from `git repo info`, you should provide
49the keys that identify them. Here's a list of the available keys and the
50values that they return:
51
52`layout.bare`::
53 `true` if this is a bare repository, otherwise `false`.
54
55`layout.shallow`::
56 `true` if this is a shallow repository, otherwise `false`.
57
58`object.format`::
59 The object format (hash algorithm) used in the repository.
60
61`references.format`::
62 The reference storage format. The valid values are:
63+
64include::ref-storage-format.adoc[]
65
66EXAMPLES
67--------
68
69* Retrieves the reference format of the current repository:
70+
71------------
72git repo info references.format
73------------
74+
75
76* Retrieves whether the current repository is bare and whether it is shallow
77using the `nul` format:
78+
79------------
80git repo info --format=nul layout.bare layout.shallow
81------------
82
83SEE ALSO
84--------
85linkgit:git-rev-parse[1]
86
87GIT
88---
89Part of the linkgit:git[1] suite