git-repo(1) — Linux manual page

NAME | SYNOPSIS | DESCRIPTION | COMMANDS | INFO KEYS | EXAMPLES | SEE ALSO | GIT | COLOPHON

GIT-REPO(1)                     Git Manual                    GIT-REPO(1)

NAME         top

       git-repo - Retrieve information about the repository

SYNOPSIS         top

       git repo info [--format=(lines|nul) | -z] [--all | <key>...]
       git repo info --keys [--format=(lines|nul) | -z]
       git repo structure [--format=(table|lines|nul) | -z]

DESCRIPTION         top

       Retrieve information about the repository.

       THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.

COMMANDS         top

       info [--format=(lines|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:

           lines
               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)). This is the default.

           nul
               Similar to lines, 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 lines.
               Unlike in the lines format, the values are never quoted.

               -z is an alias for --format=nul.

       info --keys [--format=(lines|nul) | -z]
           List all the available keys, one per line. The output format
           can be chosen through the flag --format. The following formats
           are supported:

           lines
               Output the keys one per line. This is the default.

           nul
               Similar to lines, but using a NUL character after each
               value.

       structure [--format=(table|lines|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

           •   Largest reachable objects in the repository by type

               The output format can be chosen through the flag --format.
               Three formats are supported:

               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.

               lines
                   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)).

               nul
                   Similar to lines, 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 lines format,
                   values containing "unusual" characters are never
                   quoted.

                   -z is an alias for --format=nul.

INFO KEYS         top

       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
           true if this is a bare repository, otherwise false.

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

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

       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.

EXAMPLES         top

       •   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

SEE ALSO         top

       git-rev-parse(1)

GIT         top

       Part of the git(1) suite

COLOPHON         top

       This page is part of the git (Git distributed version control
       system) project.  Information about the project can be found at 
       ⟨http://git-scm.com/⟩.  If you have a bug report for this manual
       page, see ⟨http://git-scm.com/community⟩.  This page was obtained
       from the project's upstream Git repository
       ⟨https://github.com/git/git.git⟩ on 2026-05-24.  (At that time,
       the date of the most recent commit that was found in the
       repository was 2026-05-22.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there is
       a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to
       man-pages@man7.org

Git 2.54.0.254.g6a4418          2026-05-22                    GIT-REPO(1)

Pages that refer to this page: git(1)