Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/Documentation/git-repo.adoc # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / Documentation / git-repo.adoc` 157 lines ยท 4841 bytes Raw Blame History 1 git-repo(1) 2 =========== 3 4 NAME 5 ---- 6 git-repo - Retrieve information about the repository 7 8 SYNOPSIS 9 -------- 10 [synopsis] 11 git repo info [--format=(lines|nul) | -z] [--all | ...] 12 git repo info --keys [--format=(lines|nul) | -z] 13 git repo structure [--format=(table|lines|nul) | -z] 14 15 DESCRIPTION 16 ----------- 17 Retrieve information about the repository. 18 19 THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE. 20 21 COMMANDS 22 -------- 23 `info [--format=(lines|nul) | -z] [--all | ...]`:: 24 Retrieve metadata-related information about the current repository. Only 25 the requested data will be returned based on their keys 26 (see <> section below). 27 + 28 The values are returned in the same order in which their respective keys were 29 requested. The `--all` flag requests the values for all the available keys. 30 + 31 The output format can be chosen through the flag `--format`. Two formats are 32 supported: 33 + 34 35 `lines`::: 36 Output key-value pairs one per line using the `=` character as 37 the delimiter between the key and the value. Values containing "unusual" 38 characters are quoted as explained for the configuration variable 39 `core.quotePath` (see linkgit:git-config[1]). This is the default. 40 41 `nul`::: 42 Similar to `lines`, but using a newline character as the delimiter 43 between the key and the value and using a _NUL_ character after each value. 44 This format is better suited for being parsed by another applications than 45 `lines`. Unlike in the `lines` format, the values are never quoted. 46 + 47 `-z` is an alias for `--format=nul`. 48 49 `info --keys [--format=(lines|nul) | -z]`:: 50 List all the available keys, one per line. The output format can be chosen 51 through the flag `--format`. The following formats are supported: 52 + 53 `lines`::: 54 Output the keys one per line. This is the default. 55 56 `nul`::: 57 Similar to `lines`, but using a _NUL_ character after each value. 58 59 `structure [--format=(table|lines|nul) | -z]`:: 60 Retrieve statistics about the current repository structure. The 61 following kinds of information are reported: 62 + 63 * Reference counts categorized by type 64 * Reachable object counts categorized by type 65 * Total inflated size of reachable objects by type 66 * Total disk size of reachable objects by type 67 * Largest reachable objects in the repository by type 68 + 69 The output format can be chosen through the flag `--format`. Three formats are 70 supported: 71 + 72 `table`::: 73 Outputs repository stats in a human-friendly table. This format may 74 change and is not intended for machine parsing. This is the default 75 format. 76 77 `lines`::: 78 Each line of output contains a key-value pair for a repository stat. 79 The '=' character is used to delimit between the key and the value. 80 Values containing "unusual" characters are quoted as explained for the 81 configuration variable `core.quotePath` (see linkgit:git-config[1]). 82 83 `nul`::: 84 Similar to `lines`, but uses a _NUL_ character to delimit between 85 key-value pairs instead of a newline. Also uses a newline character as 86 the delimiter between the key and value instead of '='. Unlike the 87 `lines` format, values containing "unusual" characters are never 88 quoted. 89 + 90 `-z` is an alias for `--format=nul`. 91 92 [[INFO_KEYS]] 93 INFO KEYS 94 --------- 95 In order to obtain a set of values from `git repo info`, you should provide 96 the keys that identify them. Here's a list of the available keys and the 97 values that they return: 98 99 `layout.bare`:: 100 `true` if this is a bare repository, otherwise `false`. 101 102 `layout.shallow`:: 103 `true` if this is a shallow repository, otherwise `false`. 104 105 `object.format`:: 106 The object format (hash algorithm) used in the repository. 107 108 `objects.storageFormat`:: 109 The object storage format used in the repository, as configured via 110 `extensions.objectStorage`. The valid values are: 111 + 112 include::object-storage-format.adoc[] 113 114 `path.commondir.absolute`:: 115 The canonical absolute path to the Git repository's common 116 directory (the shared `.git` directory containing objects, 117 refs, and global configuration). 118 119 `path.commondir.relative`:: 120 The path to the Git repository's common directory relative to 121 the current working directory. 122 123 `path.gitdir.absolute`:: 124 The canonical absolute path to the Git repository directory (the `.git` directory). 125 126 `path.gitdir.relative`:: 127 The path to the Git repository directory relative to the current working directory. 128 129 `references.storageFormat`:: 130 The reference storage format. The valid values are: 131 + 132 include::ref-storage-format.adoc[] 133 134 EXAMPLES 135 -------- 136 137 * Retrieves the reference storage format of the current repository: 138 + 139 ------------ 140 git repo info references.storageFormat 141 ------------ 142 + 143 144 * Retrieves whether the current repository is bare and whether it is shallow 145 using the `nul` format: 146 + 147 ------------ 148 git repo info --format=nul layout.bare layout.shallow 149 ------------ 150 151 SEE ALSO 152 -------- 153 linkgit:git-rev-parse[1] 154 155 GIT 156 --- 157 Part of the linkgit:git[1] suite