[![Git](https://git-scm.com/images/logo@2x.png)](https://git-scm.com/) --fast-version-control
![](https://git-scm.com/images/dark-mode.svg)
  * [About](https://git-scm.com/about)
    * [Trademark](https://git-scm.com/about/trademark)
  * [Learn](https://git-scm.com/learn)
    * [Book](https://git-scm.com/book)
    * [Cheat Sheet](https://git-scm.com/cheat-sheet)
    * [Videos](https://git-scm.com/videos)
    * [External Links](https://git-scm.com/doc/ext)
  * [Tools](https://git-scm.com/tools)
    * [Command Line](https://git-scm.com/tools/command-line)
    * [GUIs](https://git-scm.com/tools/guis)
    * [Hosting](https://git-scm.com/tools/hosting)
  * [Reference](https://git-scm.com/docs)
  * [Install](https://git-scm.com/install/linux)
  * [Community](https://git-scm.com/community)


  * Table of Contents
    * [NAME](https://git-scm.com/docs/git-repo#_name)
    * [SYNOPSIS](https://git-scm.com/docs/git-repo#_synopsis)
    * [DESCRIPTION](https://git-scm.com/docs/git-repo#_description)
    * [COMMANDS](https://git-scm.com/docs/git-repo#_commands)
    * [INFO KEYS](https://git-scm.com/docs/git-repo#_info_keys)
    * [EXAMPLES](https://git-scm.com/docs/git-repo#_examples)
    * [SEE ALSO](https://git-scm.com/docs/git-repo#_see_also)
    * [GIT](https://git-scm.com/docs/git-repo#_git)


[ English ▾](https://git-scm.com/docs/git-repo)
Localized versions of **git-repo** manual
  1. [English ](https://git-scm.com/docs/git-repo)

Want to read in your language or fix typos?
[You can help translate this page](https://github.com/jnavila/git-manpages-l10n).
[Topics ▾](https://git-scm.com/docs/git-repo)
### Setup and Config
  * [ git ](https://git-scm.com/docs/git)
  * [ config ](https://git-scm.com/docs/git-config)
  * [ help ](https://git-scm.com/docs/git-help)
  * [ bugreport ](https://git-scm.com/docs/git-bugreport)
  * [ Credential helpers ](https://git-scm.com/doc/credential-helpers)


### Getting and Creating Projects
  * [ init ](https://git-scm.com/docs/git-init)
  * [ clone ](https://git-scm.com/docs/git-clone)


### Basic Snapshotting
  * [ add ](https://git-scm.com/docs/git-add)
  * [ status ](https://git-scm.com/docs/git-status)
  * [ diff ](https://git-scm.com/docs/git-diff)
  * [ commit ](https://git-scm.com/docs/git-commit)
  * [ notes ](https://git-scm.com/docs/git-notes)
  * [ restore ](https://git-scm.com/docs/git-restore)
  * [ reset ](https://git-scm.com/docs/git-reset)
  * [ rm ](https://git-scm.com/docs/git-rm)
  * [ mv ](https://git-scm.com/docs/git-mv)


### Branching and Merging
  * [ branch ](https://git-scm.com/docs/git-branch)
  * [ checkout ](https://git-scm.com/docs/git-checkout)
  * [ switch ](https://git-scm.com/docs/git-switch)
  * [ merge ](https://git-scm.com/docs/git-merge)
  * [ mergetool ](https://git-scm.com/docs/git-mergetool)
  * [ log ](https://git-scm.com/docs/git-log)
  * [ stash ](https://git-scm.com/docs/git-stash)
  * [ tag ](https://git-scm.com/docs/git-tag)
  * [ worktree ](https://git-scm.com/docs/git-worktree)


### Sharing and Updating Projects
  * [ fetch ](https://git-scm.com/docs/git-fetch)
  * [ pull ](https://git-scm.com/docs/git-pull)
  * [ push ](https://git-scm.com/docs/git-push)
  * [ remote ](https://git-scm.com/docs/git-remote)
  * [ submodule ](https://git-scm.com/docs/git-submodule)


### Inspection and Comparison
  * [ show ](https://git-scm.com/docs/git-show)
  * [ log ](https://git-scm.com/docs/git-log)
  * [ diff ](https://git-scm.com/docs/git-diff)
  * [ difftool ](https://git-scm.com/docs/git-difftool)
  * [ range-diff ](https://git-scm.com/docs/git-range-diff)
  * [ shortlog ](https://git-scm.com/docs/git-shortlog)
  * [ describe ](https://git-scm.com/docs/git-describe)


### Patching
  * [ apply ](https://git-scm.com/docs/git-apply)
  * [ cherry-pick ](https://git-scm.com/docs/git-cherry-pick)
  * [ diff ](https://git-scm.com/docs/git-diff)
  * [ rebase ](https://git-scm.com/docs/git-rebase)
  * [ revert ](https://git-scm.com/docs/git-revert)


### Debugging
  * [ bisect ](https://git-scm.com/docs/git-bisect)
  * [ blame ](https://git-scm.com/docs/git-blame)
  * [ grep ](https://git-scm.com/docs/git-grep)


### Email
  * [ am ](https://git-scm.com/docs/git-am)
  * [ apply ](https://git-scm.com/docs/git-apply)
  * [ imap-send ](https://git-scm.com/docs/git-imap-send)
  * [ format-patch ](https://git-scm.com/docs/git-format-patch)
  * [ send-email ](https://git-scm.com/docs/git-send-email)
  * [ request-pull ](https://git-scm.com/docs/git-request-pull)


### External Systems
  * [ svn ](https://git-scm.com/docs/git-svn)
  * [ fast-import ](https://git-scm.com/docs/git-fast-import)


### Server Admin
  * [ daemon ](https://git-scm.com/docs/git-daemon)
  * [ update-server-info ](https://git-scm.com/docs/git-update-server-info)


### Guides
  * [ gitattributes ](https://git-scm.com/docs/gitattributes)
  * [ Command-line interface conventions ](https://git-scm.com/docs/gitcli)
  * [ Everyday Git ](https://git-scm.com/docs/giteveryday)
  * [ Frequently Asked Questions (FAQ) ](https://git-scm.com/docs/gitfaq)
  * [ Glossary ](https://git-scm.com/docs/gitglossary)
  * [ Hooks ](https://git-scm.com/docs/githooks)
  * [ gitignore ](https://git-scm.com/docs/gitignore)
  * [ gitmodules ](https://git-scm.com/docs/gitmodules)
  * [ Revisions ](https://git-scm.com/docs/gitrevisions)
  * [ Submodules ](https://git-scm.com/docs/gitsubmodules)
  * [ Tutorial ](https://git-scm.com/docs/gittutorial)
  * [ Workflows ](https://git-scm.com/docs/gitworkflows)
  * [ All guides... ](https://git-scm.com/docs/git#_guides)


### Administration
  * [ clean ](https://git-scm.com/docs/git-clean)
  * [ gc ](https://git-scm.com/docs/git-gc)
  * [ fsck ](https://git-scm.com/docs/git-fsck)
  * [ reflog ](https://git-scm.com/docs/git-reflog)
  * [ filter-branch ](https://git-scm.com/docs/git-filter-branch)
  * [ instaweb ](https://git-scm.com/docs/git-instaweb)
  * [ archive ](https://git-scm.com/docs/git-archive)
  * [ bundle ](https://git-scm.com/docs/git-bundle)


### Plumbing Commands
  * [ cat-file ](https://git-scm.com/docs/git-cat-file)
  * [ check-ignore ](https://git-scm.com/docs/git-check-ignore)
  * [ checkout-index ](https://git-scm.com/docs/git-checkout-index)
  * [ commit-tree ](https://git-scm.com/docs/git-commit-tree)
  * [ count-objects ](https://git-scm.com/docs/git-count-objects)
  * [ diff-index ](https://git-scm.com/docs/git-diff-index)
  * [ for-each-ref ](https://git-scm.com/docs/git-for-each-ref)
  * [ hash-object ](https://git-scm.com/docs/git-hash-object)
  * [ ls-files ](https://git-scm.com/docs/git-ls-files)
  * [ ls-tree ](https://git-scm.com/docs/git-ls-tree)
  * [ merge-base ](https://git-scm.com/docs/git-merge-base)
  * [ read-tree ](https://git-scm.com/docs/git-read-tree)
  * [ rev-list ](https://git-scm.com/docs/git-rev-list)
  * [ rev-parse ](https://git-scm.com/docs/git-rev-parse)
  * [ show-ref ](https://git-scm.com/docs/git-show-ref)
  * [ symbolic-ref ](https://git-scm.com/docs/git-symbolic-ref)
  * [ update-index ](https://git-scm.com/docs/git-update-index)
  * [ update-ref ](https://git-scm.com/docs/git-update-ref)
  * [ verify-pack ](https://git-scm.com/docs/git-verify-pack)
  * [ write-tree ](https://git-scm.com/docs/git-write-tree)


[ Latest version ▾ ](https://git-scm.com/docs/git-repo) git-repo last updated in 2.53.0
Changes in the **git-repo** manual
  1. [2.53.0 ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) _2026-02-02_ ](https://git-scm.com/docs/git-repo/2.53.0)
  2. [2.52.0 ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) _2025-11-17_ ](https://git-scm.com/docs/git-repo/2.52.0)


Check your version of git by running
`git --version`
##  [](https://git-scm.com/docs/git-repo#_name)NAME
git-repo - Retrieve information about the repository
##  [](https://git-scm.com/docs/git-repo#_synopsis)SYNOPSIS
```
git repo info [--format=(keyvalue|nul) | -z] [--all | _<key>_…​]
git repo structure [--format=(table|keyvalue|nul) | -z]
```

##  [](https://git-scm.com/docs/git-repo#_description)DESCRIPTION
Retrieve information about the repository.
THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
##  [](https://git-scm.com/docs/git-repo#_commands)COMMANDS

[](https://git-scm.com/docs/git-repo#Documentation/git-repo.txt-info--formatkeyvaluenul-z--allkey)`info` [`--format=`(`keyvalue`|`nul`) | `-z`] [`--all` | _< 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 `--all` flag requests the values for all the available keys.
The output format can be chosen through the flag `--format`. Two formats are supported:

[](https://git-scm.com/docs/git-repo#Documentation/git-repo.txt-keyvalue)`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 variable `core.quotePath` (see [git-config[1]](https://git-scm.com/docs/git-config)). This is the default.

[](https://git-scm.com/docs/git-repo#Documentation/git-repo.txt-nul)`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 than `keyvalue`. Unlike in the `keyvalue` format, the values are never quoted.
`-z` is an alias for `--format=nul`.

[](https://git-scm.com/docs/git-repo#Documentation/git-repo.txt-structure--formattablekeyvaluenul-z)`structure` [`--format=`(`table`|`keyvalue`|`nul`) | `-z`]

Retrieve statistics about the current repository structure. The following kinds of information are reported:
  * Reference counts categorized by type
  * Reachable object counts categorized by type
  * Total inflated size of reachable objects by type
  * Total disk size of reachable objects by type
The output format can be chosen through the flag `--format`. Three formats are supported:

[](https://git-scm.com/docs/git-repo#Documentation/git-repo.txt-table)`table`

Outputs repository stats in a human-friendly table. This format may change and is not intended for machine parsing. This is the default format.

[](https://git-scm.com/docs/git-repo#Documentation/git-repo.txt-keyvalue-1)`keyvalue`

Each line of output contains a key-value pair for a repository stat. The _=_ character is used to delimit between the key and the value. Values containing "unusual" characters are quoted as explained for the configuration variable `core.quotePath` (see [git-config[1]](https://git-scm.com/docs/git-config)).

[](https://git-scm.com/docs/git-repo#Documentation/git-repo.txt-nul-1)`nul`

Similar to `keyvalue`, but uses a NUL 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 _=_. Unlike the `keyvalue` format, values containing "unusual" characters are never quoted.
`-z` is an alias for `--format=nul`.


##  [](https://git-scm.com/docs/git-repo#_info_keys)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:

[](https://git-scm.com/docs/git-repo#Documentation/git-repo.txt-layoutbare)`layout.bare`

`true` if this is a bare repository, otherwise `false`.

[](https://git-scm.com/docs/git-repo#Documentation/git-repo.txt-layoutshallow)`layout.shallow`

`true` if this is a shallow repository, otherwise `false`.

[](https://git-scm.com/docs/git-repo#Documentation/git-repo.txt-objectformat)`object.format`

The object format (hash algorithm) used in the repository.

[](https://git-scm.com/docs/git-repo#Documentation/git-repo.txt-referencesformat)`references.format`

The reference storage format. The valid values are:
  * `files` for loose files with packed-refs. This is the default.
  * `reftable` for the reftable format. This format is experimental and its internals are subject to change.


##  [](https://git-scm.com/docs/git-repo#_examples)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 `nul` format:
```
git repo info --format=nul layout.bare layout.shallow
```



##  [](https://git-scm.com/docs/git-repo#_see_also)SEE ALSO
[git-rev-parse[1]](https://git-scm.com/docs/git-rev-parse)
##  [](https://git-scm.com/docs/git-repo#_git)GIT
Part of the [git[1]](https://git-scm.com/docs/git) suite
### repo
[About this site](https://git-scm.com/site)
Patches, suggestions, and comments are welcome.
Git is a member of [Software Freedom Conservancy](https://git-scm.com/sfc)
