{
    "content": [
        {
            "type": "text",
            "text": "# git-rev-parse(1) (man)\n\n**Summary:** git-rev-parse - Pick out and massage parameters\n\n**Synopsis:** git rev-parse [<options>] <args>...\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| — | --parseopt | — | Use git rev-parse in option parsing mode (see PARSEOPT section below). |\n| — | --sq-quote | — | Use git rev-parse in shell quoting mode (see SQ-QUOTE section below). In contrast to the --sq option below, this mode do |\n| — | --keep-dashdash | — | Only meaningful in --parseopt mode. Tells the option parser to echo out the first -- met instead of skipping it. |\n| — | --stop-at-non-option | — | Only meaningful in --parseopt mode. Lets the option parser stop at the first non-option argument. This can be used to pa |\n| — | --stuck-long | — | Only meaningful in --parseopt mode. Output the options in their long form if available, and with their arguments stuck. |\n| — | --revs-only | — | Do not output flags and parameters not meant for git rev-list command. |\n| — | --no-revs | — | Do not output flags and parameters meant for git rev-list command. |\n| — | --flags | — | Do not output non-flag parameters. |\n| — | --no-flags | — | Do not output flag parameters. |\n| — | --default | <arg> | If there is no parameter given by the user, use <arg> instead. |\n| — | --prefix | <arg> | Behave as if git rev-parse was invoked from the <arg> subdirectory of the working tree. Any relative filenames are resol |\n| — | --verify | — | Verify that exactly one parameter is provided, and that it can be turned into a raw 20-byte SHA-1 that can be used to ac |\n| -q | --quiet | — | Only meaningful in --verify mode. Do not output an error message if the first argument is not a valid object name; inste |\n| — | --sq | — | Usually the output is made one line per flag and parameter. This option makes output a single line, properly quoted for  |\n| — | — | — | Same as --verify but shortens the object name to a unique prefix with at least length characters. The minimum length is  |\n| — | --not | — | When showing object names, prefix them with ^ and strip ^ prefix from the object names that already have one. |\n| — | — | — | A non-ambiguous short name of the objects name. The option core.warnAmbiguousRefs is used to select the strict abbreviat |\n| — | --symbolic | — | Usually the object names are output in SHA-1 form (with possible ^ prefix); this option makes them output in a form as c |\n| — | --symbolic-full-name | — | This is similar to --symbolic, but it omits input that are not refs (i.e. branch or tag names; or more explicitly disamb |\n| — | --all | — | Show all refs found in refs/. |\n| — | — | — | Show all branches, tags, or remote-tracking branches, respectively (i.e., refs found in refs/heads, refs/tags, or refs/r |\n| — | --local-env-vars | — | List the GIT* environment variables that are local to the repository (e.g. GITDIR or GITWORKTREE, but not GITEDITOR). On |\n| — | --git-dir | — | Show $GITDIR if defined. Otherwise show the path to the .git directory. The path shown, when relative, is relative to th |\n| — | --git-common-dir | — | Show $GITCOMMONDIR if defined, else $GITDIR. |\n| — | --resolve-git-dir | <path> | Check if <path> is a valid repository or a gitfile that points at a valid repository, and print the location of the repo |\n| — | --git-path | <path> | Resolve \"$GITDIR/<path>\" and takes other path relocation variables such as $GITOBJECTDIRECTORY, $GITINDEXFILE... into ac |\n| — | --show-toplevel | — | Show the (by default, absolute) path of the top-level directory of the working tree. If there is no working tree, report |\n| — | --show-superproject-working-tree | — | Show the absolute path of the root of the superproject’s working tree (if exists) that uses the current repository as it |\n| — | --shared-index-path | — | Show the path to the shared index file in split index mode, or empty if not in split-index mode. The following options a |\n| — | --absolute-git-dir | — | Like --git-dir, but its output is always the canonicalized absolute path. |\n| — | --is-inside-git-dir | — | When the current working directory is below the repository directory print \"true\", otherwise \"false\". |\n| — | --is-inside-work-tree | — | When the current working directory is inside the work tree of the repository print \"true\", otherwise \"false\". |\n| — | --is-bare-repository | — | When the repository is bare print \"true\", otherwise \"false\". |\n| — | --is-shallow-repository | — | When the repository is shallow print \"true\", otherwise \"false\". |\n| — | --show-cdup | — | When the command is invoked from a subdirectory, show the path of the top-level directory relative to the current direct |\n| — | --show-prefix | — | When the command is invoked from a subdirectory, show the path of the current directory relative to the top-level direct |\n| — | — | — | Show the object format (hash algorithm) used for the repository for storage inside the .git directory, input, or output. |\n\n## Examples\n\n- `•   Print the object name of the current commit:`\n- `$ git rev-parse --verify HEAD`\n- `•   Print the commit object name from the revision in the $REV shell variable:`\n- `$ git rev-parse --verify --end-of-options $REV^{commit}`\n- `This will error out if $REV is empty or not a valid revision.`\n- `•   Similar to above:`\n- `$ git rev-parse --default master --verify --end-of-options $REV`\n- `but if $REV is empty, the commit object name from master will be printed.`\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (3 lines)\n- **DESCRIPTION** (5 lines)\n- **OPTIONS** (1 lines) — 44 subsections\n  - Operation Modes (2 lines)\n  - --parseopt (2 lines)\n  - --sq-quote (3 lines)\n  - Options for --parseopt (1 lines)\n  - --keep-dashdash (3 lines)\n  - --stop-at-non-option (3 lines)\n  - --stuck-long (3 lines)\n  - Options for Filtering (1 lines)\n  - --revs-only (2 lines)\n  - --no-revs (2 lines)\n  - --flags (2 lines)\n  - --no-flags (2 lines)\n  - Options for Output (1 lines)\n  - --default <arg> (2 lines)\n  - --prefix <arg> (13 lines)\n  - --verify (14 lines)\n  - -q, --quiet (4 lines)\n  - --sq (6 lines)\n  - --short[=length] (4 lines)\n  - --not (3 lines)\n  - --abbrev-ref[=(strict|loose)] (3 lines)\n  - --symbolic (3 lines)\n  - --symbolic-full-name (5 lines)\n  - Options for Objects (1 lines)\n  - --all (2 lines)\n  - --branches[=pattern], --tags[=pattern], --remotes[=pattern] (28 lines)\n  - Options for Files (1 lines)\n  - --local-env-vars (16 lines)\n  - --git-dir (6 lines)\n  - --git-common-dir (2 lines)\n  - --resolve-git-dir <path> (4 lines)\n  - --git-path <path> (5 lines)\n  - --show-toplevel (3 lines)\n  - --show-superproject-working-tree (4 lines)\n  - --shared-index-path (5 lines)\n  - --absolute-git-dir (2 lines)\n  - --is-inside-git-dir (3 lines)\n  - --is-inside-work-tree (3 lines)\n  - --is-bare-repository (2 lines)\n  - --is-shallow-repository (2 lines)\n  - --show-cdup (3 lines)\n  - --show-prefix (3 lines)\n  - --show-object-format[=(storage|input|output)] (4 lines)\n  - Other Options (11 lines)\n- **SPECIFYING REVISIONS** (195 lines)\n- **SPECIFYING RANGES** (14 lines) — 3 subsections\n  - Commit Exclusions (5 lines)\n  - Dotted Range Notations (33 lines)\n  - Other <rev>^ Parent Shorthand Notations (16 lines)\n- **REVISION RANGE SUMMARY** (51 lines)\n- **PARSEOPT** (11 lines) — 6 subsections\n  - Input Format (10 lines)\n  - <opt-spec> (4 lines)\n  - <flags> (12 lines)\n  - <arg-hint> (10 lines)\n  - Example (18 lines)\n  - Usage text (16 lines)\n- **SQ-QUOTE** (7 lines) — 1 subsections\n  - Example (11 lines)\n- **EXAMPLES** (17 lines)\n- **GIT** (5 lines)\n\n## Full Content\n\n### NAME\n\ngit-rev-parse - Pick out and massage parameters\n\n### SYNOPSIS\n\ngit rev-parse [<options>] <args>...\n\n### DESCRIPTION\n\nMany Git porcelainish commands take mixture of flags (i.e. parameters that begin with a dash\n-) and parameters meant for the underlying git rev-list command they use internally and flags\nand parameters for the other commands they use downstream of git rev-list. This command is\nused to distinguish between them.\n\n### OPTIONS\n\n#### Operation Modes\n\nEach of these options must appear first on the command line.\n\n#### --parseopt\n\nUse git rev-parse in option parsing mode (see PARSEOPT section below).\n\n#### --sq-quote\n\nUse git rev-parse in shell quoting mode (see SQ-QUOTE section below). In contrast to the\n--sq option below, this mode does only quoting. Nothing else is done to command input.\n\n#### Options for --parseopt\n\n#### --keep-dashdash\n\nOnly meaningful in --parseopt mode. Tells the option parser to echo out the first -- met\ninstead of skipping it.\n\n#### --stop-at-non-option\n\nOnly meaningful in --parseopt mode. Lets the option parser stop at the first non-option\nargument. This can be used to parse sub-commands that take options themselves.\n\n#### --stuck-long\n\nOnly meaningful in --parseopt mode. Output the options in their long form if available,\nand with their arguments stuck.\n\n#### Options for Filtering\n\n#### --revs-only\n\nDo not output flags and parameters not meant for git rev-list command.\n\n#### --no-revs\n\nDo not output flags and parameters meant for git rev-list command.\n\n#### --flags\n\nDo not output non-flag parameters.\n\n#### --no-flags\n\nDo not output flag parameters.\n\n#### Options for Output\n\n#### --default <arg>\n\nIf there is no parameter given by the user, use <arg> instead.\n\n#### --prefix <arg>\n\nBehave as if git rev-parse was invoked from the <arg> subdirectory of the working tree.\nAny relative filenames are resolved as if they are prefixed by <arg> and will be printed\nin that form.\n\nThis can be used to convert arguments to a command run in a subdirectory so that they can\nstill be used after moving to the top-level of the repository. For example:\n\nprefix=$(git rev-parse --show-prefix)\ncd \"$(git rev-parse --show-toplevel)\"\n# rev-parse provides the -- needed for 'set'\neval \"set $(git rev-parse --sq --prefix \"$prefix\" -- \"$@\")\"\n\n#### --verify\n\nVerify that exactly one parameter is provided, and that it can be turned into a raw\n20-byte SHA-1 that can be used to access the object database. If so, emit it to the\nstandard output; otherwise, error out.\n\nIf you want to make sure that the output actually names an object in your object database\nand/or can be used as a specific type of object you require, you can add the ^{type}\npeeling operator to the parameter. For example, git rev-parse \"$VAR^{commit}\" will make\nsure $VAR names an existing object that is a commit-ish (i.e. a commit, or an annotated\ntag that points at a commit). To make sure that $VAR names an existing object of any\ntype, git rev-parse \"$VAR^{object}\" can be used.\n\nNote that if you are verifying a name from an untrusted source, it is wise to use\n--end-of-options so that the name argument is not mistaken for another option.\n\n#### -q, --quiet\n\nOnly meaningful in --verify mode. Do not output an error message if the first argument is\nnot a valid object name; instead exit with non-zero status silently. SHA-1s for valid\nobject names are printed to stdout on success.\n\n#### --sq\n\nUsually the output is made one line per flag and parameter. This option makes output a\nsingle line, properly quoted for consumption by shell. Useful when you expect your\nparameter to contain whitespaces and newlines (e.g. when using pickaxe -S with git\ndiff-*). In contrast to the --sq-quote option, the command input is still interpreted as\nusual.\n\n#### --short[=length]\n\nSame as --verify but shortens the object name to a unique prefix with at least length\ncharacters. The minimum length is 4, the default is the effective value of the\ncore.abbrev configuration variable (see git-config(1)).\n\n#### --not\n\nWhen showing object names, prefix them with ^ and strip ^ prefix from the object names\nthat already have one.\n\n#### --abbrev-ref[=(strict|loose)]\n\nA non-ambiguous short name of the objects name. The option core.warnAmbiguousRefs is used\nto select the strict abbreviation mode.\n\n#### --symbolic\n\nUsually the object names are output in SHA-1 form (with possible ^ prefix); this option\nmakes them output in a form as close to the original input as possible.\n\n#### --symbolic-full-name\n\nThis is similar to --symbolic, but it omits input that are not refs (i.e. branch or tag\nnames; or more explicitly disambiguating \"heads/master\" form, when you want to name the\n\"master\" branch when there is an unfortunately named tag \"master\"), and show them as full\nrefnames (e.g. \"refs/heads/master\").\n\n#### Options for Objects\n\n#### --all\n\nShow all refs found in refs/.\n\n#### --branches[=pattern], --tags[=pattern], --remotes[=pattern]\n\nShow all branches, tags, or remote-tracking branches, respectively (i.e., refs found in\nrefs/heads, refs/tags, or refs/remotes, respectively).\n\nIf a pattern is given, only refs matching the given shell glob are shown. If the pattern\ndoes not contain a globbing character (?, *, or [), it is turned into a prefix match by\nappending /*.\n\n--glob=pattern\nShow all refs matching the shell glob pattern pattern. If the pattern does not start with\nrefs/, this is automatically prepended. If the pattern does not contain a globbing\ncharacter (?, *, or [), it is turned into a prefix match by appending /*.\n\n--exclude=<glob-pattern>\nDo not include refs matching <glob-pattern> that the next --all, --branches, --tags,\n--remotes, or --glob would otherwise consider. Repetitions of this option accumulate\nexclusion patterns up to the next --all, --branches, --tags, --remotes, or --glob option\n(other options or arguments do not clear accumulated patterns).\n\nThe patterns given should not begin with refs/heads, refs/tags, or refs/remotes when\napplied to --branches, --tags, or --remotes, respectively, and they must begin with refs/\nwhen applied to --glob or --all. If a trailing /* is intended, it must be given\nexplicitly.\n\n--disambiguate=<prefix>\nShow every object whose name begins with the given prefix. The <prefix> must be at least\n4 hexadecimal digits long to avoid listing each and every object in the repository by\nmistake.\n\n#### Options for Files\n\n#### --local-env-vars\n\nList the GIT* environment variables that are local to the repository (e.g. GITDIR or\nGITWORKTREE, but not GITEDITOR). Only the names of the variables are listed, not their\nvalue, even if they are set.\n\n--path-format=(absolute|relative)\nControls the behavior of certain other options. If specified as absolute, the paths\nprinted by those options will be absolute and canonical. If specified as relative, the\npaths will be relative to the current working directory if that is possible. The default\nis option specific.\n\nThis option may be specified multiple times and affects only the arguments that follow it\non the command line, either to the end of the command line or the next instance of this\noption.\n\nThe following options are modified by --path-format:\n\n#### --git-dir\n\nShow $GITDIR if defined. Otherwise show the path to the .git directory. The path shown,\nwhen relative, is relative to the current working directory.\n\nIf $GITDIR is not defined and the current directory is not detected to lie in a Git\nrepository or work tree print a message to stderr and exit with nonzero status.\n\n#### --git-common-dir\n\nShow $GITCOMMONDIR if defined, else $GITDIR.\n\n#### --resolve-git-dir <path>\n\nCheck if <path> is a valid repository or a gitfile that points at a valid repository, and\nprint the location of the repository. If <path> is a gitfile then the resolved path to\nthe real repository is printed.\n\n#### --git-path <path>\n\nResolve \"$GITDIR/<path>\" and takes other path relocation variables such as\n$GITOBJECTDIRECTORY, $GITINDEXFILE... into account. For example, if\n$GITOBJECTDIRECTORY is set to /foo/bar then \"git rev-parse --git-path objects/abc\"\nreturns /foo/bar/abc.\n\n#### --show-toplevel\n\nShow the (by default, absolute) path of the top-level directory of the working tree. If\nthere is no working tree, report an error.\n\n#### --show-superproject-working-tree\n\nShow the absolute path of the root of the superproject’s working tree (if exists) that\nuses the current repository as its submodule. Outputs nothing if the current repository\nis not used as a submodule by any project.\n\n#### --shared-index-path\n\nShow the path to the shared index file in split index mode, or empty if not in\nsplit-index mode.\n\nThe following options are unaffected by --path-format:\n\n#### --absolute-git-dir\n\nLike --git-dir, but its output is always the canonicalized absolute path.\n\n#### --is-inside-git-dir\n\nWhen the current working directory is below the repository directory print \"true\",\notherwise \"false\".\n\n#### --is-inside-work-tree\n\nWhen the current working directory is inside the work tree of the repository print\n\"true\", otherwise \"false\".\n\n#### --is-bare-repository\n\nWhen the repository is bare print \"true\", otherwise \"false\".\n\n#### --is-shallow-repository\n\nWhen the repository is shallow print \"true\", otherwise \"false\".\n\n#### --show-cdup\n\nWhen the command is invoked from a subdirectory, show the path of the top-level directory\nrelative to the current directory (typically a sequence of \"../\", or an empty string).\n\n#### --show-prefix\n\nWhen the command is invoked from a subdirectory, show the path of the current directory\nrelative to the top-level directory.\n\n#### --show-object-format[=(storage|input|output)]\n\nShow the object format (hash algorithm) used for the repository for storage inside the\n.git directory, input, or output. For input, multiple algorithms may be printed,\nspace-separated. If not specified, the default is \"storage\".\n\n#### Other Options\n\n--since=datestring, --after=datestring\nParse the date string, and output the corresponding --max-age= parameter for git\nrev-list.\n\n--until=datestring, --before=datestring\nParse the date string, and output the corresponding --min-age= parameter for git\nrev-list.\n\n<args>...\nFlags and parameters to be parsed.\n\n### SPECIFYING REVISIONS\n\nA revision parameter <rev> typically, but not necessarily, names a commit object. It uses\nwhat is called an extended SHA-1 syntax. Here are various ways to spell object names. The\nones listed near the end of this list name trees and blobs contained in a commit.\n\nNote\nThis document shows the \"raw\" syntax as seen by git. The shell and other UIs might\nrequire additional quoting to protect special characters and to avoid word splitting.\n\n<sha1>, e.g. dae86e1950b1277e545cee180551750029cfe735, dae86e\nThe full SHA-1 object name (40-byte hexadecimal string), or a leading substring that is\nunique within the repository. E.g. dae86e1950b1277e545cee180551750029cfe735 and dae86e\nboth name the same commit object if there is no other object in your repository whose\nobject name starts with dae86e.\n\n<describeOutput>, e.g. v1.7.4.2-679-g3bee7fb\nOutput from git describe; i.e. a closest tag, optionally followed by a dash and a number\nof commits, followed by a dash, a g, and an abbreviated object name.\n\n<refname>, e.g. master, heads/master, refs/heads/master\nA symbolic ref name. E.g.  master typically means the commit object referenced by\nrefs/heads/master. If you happen to have both heads/master and tags/master, you can\nexplicitly say heads/master to tell Git which one you mean. When ambiguous, a <refname>\nis disambiguated by taking the first match in the following rules:\n\n1. If $GITDIR/<refname> exists, that is what you mean (this is usually useful only for\nHEAD, FETCHHEAD, ORIGHEAD, MERGEHEAD and CHERRYPICKHEAD);\n\n2. otherwise, refs/<refname> if it exists;\n\n3. otherwise, refs/tags/<refname> if it exists;\n\n4. otherwise, refs/heads/<refname> if it exists;\n\n5. otherwise, refs/remotes/<refname> if it exists;\n\n6. otherwise, refs/remotes/<refname>/HEAD if it exists.\n\nHEAD names the commit on which you based the changes in the working tree.  FETCHHEAD\nrecords the branch which you fetched from a remote repository with your last git\nfetch invocation.  ORIGHEAD is created by commands that move your HEAD in a drastic\nway, to record the position of the HEAD before their operation, so that you can\neasily change the tip of the branch back to the state before you ran them.\nMERGEHEAD records the commit(s) which you are merging into your branch when you run\ngit merge.  CHERRYPICKHEAD records the commit which you are cherry-picking when you\nrun git cherry-pick.\n\nNote that any of the refs/* cases above may come either from the $GITDIR/refs\ndirectory or from the $GITDIR/packed-refs file. While the ref name encoding is\nunspecified, UTF-8 is preferred as some output processing may assume ref names in\nUTF-8.\n\n@\n@ alone is a shortcut for HEAD.\n\n[<refname>]@{<date>}, e.g. master@{yesterday}, HEAD@{5 minutes ago}\nA ref followed by the suffix @ with a date specification enclosed in a brace pair (e.g.\n{yesterday}, {1 month 2 weeks 3 days 1 hour 1 second ago} or {1979-02-26 18:30:00})\nspecifies the value of the ref at a prior point in time. This suffix may only be used\nimmediately following a ref name and the ref must have an existing log\n($GITDIR/logs/<ref>). Note that this looks up the state of your local ref at a given\ntime; e.g., what was in your local master branch last week. If you want to look at\ncommits made during certain times, see --since and --until.\n\n<refname>@{<n>}, e.g. master@{1}\nA ref followed by the suffix @ with an ordinal specification enclosed in a brace pair\n(e.g.  {1}, {15}) specifies the n-th prior value of that ref. For example master@{1} is\nthe immediate prior value of master while master@{5} is the 5th prior value of master.\nThis suffix may only be used immediately following a ref name and the ref must have an\nexisting log ($GITDIR/logs/<refname>).\n\n@{<n>}, e.g. @{1}\nYou can use the @ construct with an empty ref part to get at a reflog entry of the\ncurrent branch. For example, if you are on branch blabla then @{1} means the same as\nblabla@{1}.\n\n@{-<n>}, e.g. @{-1}\nThe construct @{-<n>} means the <n>th branch/commit checked out before the current one.\n\n[<branchname>]@{upstream}, e.g. master@{upstream}, @{u}\nThe suffix @{upstream} to a branchname (short form <branchname>@{u}) refers to the branch\nthat the branch specified by branchname is set to build on top of (configured with\nbranch.<name>.remote and branch.<name>.merge). A missing branchname defaults to the\ncurrent one. These suffixes are also accepted when spelled in uppercase, and they mean\nthe same thing no matter the case.\n\n[<branchname>]@{push}, e.g. master@{push}, @{push}\nThe suffix @{push} reports the branch \"where we would push to\" if git push were run while\nbranchname was checked out (or the current HEAD if no branchname is specified). Since our\npush destination is in a remote repository, of course, we report the local tracking\nbranch that corresponds to that branch (i.e., something in refs/remotes/).\n\nHere’s an example to make it more clear:\n\n$ git config push.default current\n$ git config remote.pushdefault myfork\n$ git switch -c mybranch origin/master\n\n$ git rev-parse --symbolic-full-name @{upstream}\nrefs/remotes/origin/master\n\n$ git rev-parse --symbolic-full-name @{push}\nrefs/remotes/myfork/mybranch\n\nNote in the example that we set up a triangular workflow, where we pull from one location\nand push to another. In a non-triangular workflow, @{push} is the same as @{upstream},\nand there is no need for it.\n\nThis suffix is also accepted when spelled in uppercase, and means the same thing no\nmatter the case.\n\n<rev>^[<n>], e.g. HEAD^, v1.5.1^0\nA suffix ^ to a revision parameter means the first parent of that commit object.  ^<n>\nmeans the <n>th parent (i.e.  <rev>^ is equivalent to <rev>^1). As a special rule,\n<rev>^0 means the commit itself and is used when <rev> is the object name of a tag object\nthat refers to a commit object.\n\n<rev>~[<n>], e.g. HEAD~, master~3\nA suffix ~ to a revision parameter means the first parent of that commit object. A suffix\n~<n> to a revision parameter means the commit object that is the <n>th generation\nancestor of the named commit object, following only the first parents. I.e.  <rev>~3 is\nequivalent to <rev>^^^ which is equivalent to <rev>^1^1^1. See below for an illustration\nof the usage of this form.\n\n<rev>^{<type>}, e.g. v0.99.8^{commit}\nA suffix ^ followed by an object type name enclosed in brace pair means dereference the\nobject at <rev> recursively until an object of type <type> is found or the object cannot\nbe dereferenced anymore (in which case, barf). For example, if <rev> is a commit-ish,\n<rev>^{commit} describes the corresponding commit object. Similarly, if <rev> is a\ntree-ish, <rev>^{tree} describes the corresponding tree object.  <rev>^0 is a short-hand\nfor <rev>^{commit}.\n\n<rev>^{object} can be used to make sure <rev> names an object that exists, without\nrequiring <rev> to be a tag, and without dereferencing <rev>; because a tag is already an\nobject, it does not have to be dereferenced even once to get to an object.\n\n<rev>^{tag} can be used to ensure that <rev> identifies an existing tag object.\n\n<rev>^{}, e.g. v0.99.8^{}\nA suffix ^ followed by an empty brace pair means the object could be a tag, and\ndereference the tag recursively until a non-tag object is found.\n\n<rev>^{/<text>}, e.g. HEAD^{/fix nasty bug}\nA suffix ^ to a revision parameter, followed by a brace pair that contains a text led by\na slash, is the same as the :/fix nasty bug syntax below except that it returns the\nyoungest matching commit which is reachable from the <rev> before ^.\n\n:/<text>, e.g. :/fix nasty bug\nA colon, followed by a slash, followed by a text, names a commit whose commit message\nmatches the specified regular expression. This name returns the youngest matching commit\nwhich is reachable from any ref, including HEAD. The regular expression can match any\npart of the commit message. To match messages starting with a string, one can use e.g.\n:/^foo. The special sequence :/!  is reserved for modifiers to what is matched.  :/!-foo\nperforms a negative match, while :/!!foo matches a literal !  character, followed by foo.\nAny other sequence beginning with :/!  is reserved for now. Depending on the given text,\nthe shell’s word splitting rules might require additional quoting.\n\n<rev>:<path>, e.g. HEAD:README, master:./README\nA suffix : followed by a path names the blob or tree at the given path in the tree-ish\nobject named by the part before the colon. A path starting with ./ or ../ is relative to\nthe current working directory. The given path will be converted to be relative to the\nworking tree’s root directory. This is most useful to address a blob or tree from a\ncommit or tree that has the same tree structure as the working tree.\n\n:[<n>:]<path>, e.g. :0:README, :README\nA colon, optionally followed by a stage number (0 to 3) and a colon, followed by a path,\nnames a blob object in the index at the given path. A missing stage number (and the colon\nthat follows it) names a stage 0 entry. During a merge, stage 1 is the common ancestor,\nstage 2 is the target branch’s version (typically the current branch), and stage 3 is the\nversion from the branch which is being merged.\n\nHere is an illustration, by Jon Loeliger. Both commit nodes B and C are parents of commit\nnode A. Parent commits are ordered left-to-right.\n\nG   H   I   J\n\\ /     \\ /\nD   E   F\n\\  |  / \\\n\\ | /   |\n\\|/    |\nB     C\n\\   /\n\\ /\nA\n\nA =      = A^0\nB = A^   = A^1     = A~1\nC =      = A^2\nD = A^^  = A^1^1   = A~2\nE = B^2  = A^^2\nF = B^3  = A^^3\nG = A^^^ = A^1^1^1 = A~3\nH = D^2  = B^^2    = A^^^2  = A~2^2\nI = F^   = B^3^    = A^^3^\nJ = F^2  = B^3^2   = A^^3^2\n\n### SPECIFYING RANGES\n\nHistory traversing commands such as git log operate on a set of commits, not just a single\ncommit.\n\nFor these commands, specifying a single revision, using the notation described in the\nprevious section, means the set of commits reachable from the given commit.\n\nSpecifying several revisions means the set of commits reachable from any of the given\ncommits.\n\nA commit’s reachable set is the commit itself and the commits in its ancestry chain.\n\nThere are several notations to specify a set of connected commits (called a \"revision\nrange\"), illustrated below.\n\n#### Commit Exclusions\n\n^<rev> (caret) Notation\nTo exclude commits reachable from a commit, a prefix ^ notation is used. E.g.  ^r1 r2\nmeans commits reachable from r2 but exclude the ones reachable from r1 (i.e.  r1 and its\nancestors).\n\n#### Dotted Range Notations\n\nThe .. (two-dot) Range Notation\nThe ^r1 r2 set operation appears so often that there is a shorthand for it. When you have\ntwo commits r1 and r2 (named according to the syntax explained in SPECIFYING REVISIONS\nabove), you can ask for commits that are reachable from r2 excluding those that are\nreachable from r1 by ^r1 r2 and it can be written as r1..r2.\n\nThe ... (three-dot) Symmetric Difference Notation\nA similar notation r1...r2 is called symmetric difference of r1 and r2 and is defined as\nr1 r2 --not $(git merge-base --all r1 r2). It is the set of commits that are reachable\nfrom either one of r1 (left side) or r2 (right side) but not from both.\n\nIn these two shorthand notations, you can omit one end and let it default to HEAD. For\nexample, origin.. is a shorthand for origin..HEAD and asks \"What did I do since I forked from\nthe origin branch?\" Similarly, ..origin is a shorthand for HEAD..origin and asks \"What did\nthe origin do since I forked from them?\" Note that .. would mean HEAD..HEAD which is an empty\nrange that is both reachable and unreachable from HEAD.\n\nCommands that are specifically designed to take two distinct ranges (e.g. \"git range-diff R1\nR2\" to compare two ranges) do exist, but they are exceptions. Unless otherwise noted, all\n\"git\" commands that operate on a set of commits work on a single revision range. In other\nwords, writing two \"two-dot range notation\" next to each other, e.g.\n\n$ git log A..B C..D\n\ndoes not specify two revision ranges for most commands. Instead it will name a single\nconnected set of commits, i.e. those that are reachable from either B or D but are reachable\nfrom neither A or C. In a linear history like this:\n\n---A---B---o---o---C---D\n\nbecause A and B are reachable from C, the revision range specified by these two dotted ranges\nis a single commit D.\n\n#### Other <rev>^ Parent Shorthand Notations\n\nThree other shorthands exist, particularly useful for merge commits, for naming a set that is\nformed by a commit and its parent commits.\n\nThe r1^@ notation means all parents of r1.\n\nThe r1^! notation includes commit r1 but excludes all of its parents. By itself, this\nnotation denotes the single commit r1.\n\nThe <rev>^-[<n>] notation includes <rev> but excludes the <n>th parent (i.e. a shorthand for\n<rev>^<n>..<rev>), with <n> = 1 if not given. This is typically useful for merge commits\nwhere you can just pass <commit>^- to get all the commits in the branch that was merged in\nmerge commit <commit> (including <commit> itself).\n\nWhile <rev>^<n> was about specifying a single commit parent, these three notations also\nconsider its parents. For example you can say HEAD^2^@, however you cannot say HEAD^@^2.\n\n### REVISION RANGE SUMMARY\n\n<rev>\nInclude commits that are reachable from <rev> (i.e. <rev> and its ancestors).\n\n^<rev>\nExclude commits that are reachable from <rev> (i.e. <rev> and its ancestors).\n\n<rev1>..<rev2>\nInclude commits that are reachable from <rev2> but exclude those that are reachable from\n<rev1>. When either <rev1> or <rev2> is omitted, it defaults to HEAD.\n\n<rev1>...<rev2>\nInclude commits that are reachable from either <rev1> or <rev2> but exclude those that\nare reachable from both. When either <rev1> or <rev2> is omitted, it defaults to HEAD.\n\n<rev>^@, e.g. HEAD^@\nA suffix ^ followed by an at sign is the same as listing all parents of <rev> (meaning,\ninclude anything reachable from its parents, but not the commit itself).\n\n<rev>^!, e.g. HEAD^!\nA suffix ^ followed by an exclamation mark is the same as giving commit <rev> and then\nall its parents prefixed with ^ to exclude them (and their ancestors).\n\n<rev>^-<n>, e.g. HEAD^-, HEAD^-2\nEquivalent to <rev>^<n>..<rev>, with <n> = 1 if not given.\n\nHere are a handful of examples using the Loeliger illustration above, with each step in the\nnotation’s expansion and selection carefully spelt out:\n\nArgs   Expanded arguments    Selected commits\nD                            G H D\nD F                          G H I J D F\n^G D                         H D\n^D B                         E I J F B\n^D B C                       E I J F B C\nC                            I J F C\nB..C   = ^B C                C\nB...C  = B ^F C              G H D E B C\nB^-    = B^..B\n= ^B^1 B              E I J F B\nC^@    = C^1\n= F                   I J F\nB^@    = B^1 B^2 B^3\n= D E F               D G H E F I J\nC^!    = C ^C^@\n= C ^C^1\n= C ^F                C\nB^!    = B ^B^@\n= B ^B^1 ^B^2 ^B^3\n= B ^D ^E ^F          B\nF^! D  = F ^I ^J D           G H D F\n\n### PARSEOPT\n\nIn --parseopt mode, git rev-parse helps massaging options to bring to shell scripts the same\nfacilities C builtins have. It works as an option normalizer (e.g. splits single switches\naggregate values), a bit like getopt(1) does.\n\nIt takes on the standard input the specification of the options to parse and understand, and\nechoes on the standard output a string suitable for sh(1) eval to replace the arguments with\nnormalized ones. In case of error, it outputs usage on the standard error stream, and exits\nwith code 129.\n\nNote: Make sure you quote the result when passing it to eval. See below for an example.\n\n#### Input Format\n\ngit rev-parse --parseopt input format is fully text based. It has two parts, separated by a\nline that contains only --. The lines before the separator (should be one or more) are used\nfor the usage. The lines after the separator describe the options.\n\nEach line of options has this format:\n\n<opt-spec><flags>*<arg-hint>? SP+ help LF\n\n#### <opt-spec>\n\nits format is the short option character, then the long option name separated by a comma.\nBoth parts are not required, though at least one is necessary. May not contain any of the\n<flags> characters.  h,help, dry-run and f are examples of correct <opt-spec>.\n\n#### <flags>\n\n<flags> are of *, =, ?  or !.\n\n•   Use = if the option takes an argument.\n\n•   Use ?  to mean that the option takes an optional argument. You probably want to use\nthe --stuck-long mode to be able to unambiguously parse the optional argument.\n\n•   Use * to mean that this option should not be listed in the usage generated for the -h\nargument. It’s shown for --help-all as documented in gitcli(7).\n\n•   Use !  to not make the corresponding negated long option available.\n\n#### <arg-hint>\n\n<arg-hint>, if specified, is used as a name of the argument in the help output, for\noptions that take arguments.  <arg-hint> is terminated by the first whitespace. It is\ncustomary to use a dash to separate words in a multi-word argument hint.\n\nThe remainder of the line, after stripping the spaces, is used as the help associated to the\noption.\n\nBlank lines are ignored, and lines that don’t match this specification are used as option\ngroup headers (start the line with a space to create such lines on purpose).\n\n#### Example\n\nOPTSSPEC=\"\\\nsome-command [<options>] <args>...\n\nsome-command does foo and bar!\n--\nh,help    show the help\n\nfoo       some nifty option --foo\nbar=      some cool option --bar with an argument\nbaz=arg   another cool option --baz with a named argument\nqux?path  qux may take a path argument but has meaning by itself\n\nAn option group Header\nC?        option C with an optional argument\"\n\neval \"$(echo \"$OPTSSPEC\" | git rev-parse --parseopt -- \"$@\" || echo exit $?)\"\n\n#### Usage text\n\nWhen \"$@\" is -h or --help in the above example, the following usage text would be shown:\n\nusage: some-command [<options>] <args>...\n\nsome-command does foo and bar!\n\n-h, --help            show the help\n--foo                 some nifty option --foo\n--bar ...             some cool option --bar with an argument\n--baz <arg>           another cool option --baz with a named argument\n--qux[=<path>]        qux may take a path argument but has meaning by itself\n\nAn option group Header\n-C[...]               option C with an optional argument\n\n### SQ-QUOTE\n\nIn --sq-quote mode, git rev-parse echoes on the standard output a single line suitable for\nsh(1) eval. This line is made by normalizing the arguments following --sq-quote. Nothing\nother than quoting the arguments is done.\n\nIf you want command input to still be interpreted as usual by git rev-parse before the output\nis shell quoted, see the --sq option.\n\n#### Example\n\n$ cat >your-git-script.sh <<\\EOF\n#!/bin/sh\nargs=$(git rev-parse --sq-quote \"$@\")   # quote user-supplied arguments\ncommand=\"git frotz -n24 $args\"          # and use it inside a handcrafted\n# command line\neval \"$command\"\nEOF\n\n$ sh your-git-script.sh \"a b'c\"\n\n### EXAMPLES\n\n•   Print the object name of the current commit:\n\n$ git rev-parse --verify HEAD\n\n\n•   Print the commit object name from the revision in the $REV shell variable:\n\n$ git rev-parse --verify --end-of-options $REV^{commit}\n\nThis will error out if $REV is empty or not a valid revision.\n\n•   Similar to above:\n\n$ git rev-parse --default master --verify --end-of-options $REV\n\nbut if $REV is empty, the commit object name from master will be printed.\n\n### GIT\n\nPart of the git(1) suite\n\n\n\nGit 2.34.1                                   02/26/2026                             GIT-REV-PARSE(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "git-rev-parse",
        "section": "1",
        "mode": "man",
        "summary": "git-rev-parse - Pick out and massage parameters",
        "synopsis": "git rev-parse [<options>] <args>...",
        "flags": [
            {
                "flag": "",
                "long": "--parseopt",
                "arg": null,
                "description": "Use git rev-parse in option parsing mode (see PARSEOPT section below)."
            },
            {
                "flag": "",
                "long": "--sq-quote",
                "arg": null,
                "description": "Use git rev-parse in shell quoting mode (see SQ-QUOTE section below). In contrast to the --sq option below, this mode does only quoting. Nothing else is done to command input."
            },
            {
                "flag": "",
                "long": "--keep-dashdash",
                "arg": null,
                "description": "Only meaningful in --parseopt mode. Tells the option parser to echo out the first -- met instead of skipping it."
            },
            {
                "flag": "",
                "long": "--stop-at-non-option",
                "arg": null,
                "description": "Only meaningful in --parseopt mode. Lets the option parser stop at the first non-option argument. This can be used to parse sub-commands that take options themselves."
            },
            {
                "flag": "",
                "long": "--stuck-long",
                "arg": null,
                "description": "Only meaningful in --parseopt mode. Output the options in their long form if available, and with their arguments stuck."
            },
            {
                "flag": "",
                "long": "--revs-only",
                "arg": null,
                "description": "Do not output flags and parameters not meant for git rev-list command."
            },
            {
                "flag": "",
                "long": "--no-revs",
                "arg": null,
                "description": "Do not output flags and parameters meant for git rev-list command."
            },
            {
                "flag": "",
                "long": "--flags",
                "arg": null,
                "description": "Do not output non-flag parameters."
            },
            {
                "flag": "",
                "long": "--no-flags",
                "arg": null,
                "description": "Do not output flag parameters."
            },
            {
                "flag": "",
                "long": "--default",
                "arg": "<arg>",
                "description": "If there is no parameter given by the user, use <arg> instead."
            },
            {
                "flag": "",
                "long": "--prefix",
                "arg": "<arg>",
                "description": "Behave as if git rev-parse was invoked from the <arg> subdirectory of the working tree. Any relative filenames are resolved as if they are prefixed by <arg> and will be printed in that form. This can be used to convert arguments to a command run in a subdirectory so that they can still be used after moving to the top-level of the repository. For example: prefix=$(git rev-parse --show-prefix) cd \"$(git rev-parse --show-toplevel)\" # rev-parse provides the -- needed for 'set' eval \"set $(git rev-parse --sq --prefix \"$prefix\" -- \"$@\")\""
            },
            {
                "flag": "",
                "long": "--verify",
                "arg": null,
                "description": "Verify that exactly one parameter is provided, and that it can be turned into a raw 20-byte SHA-1 that can be used to access the object database. If so, emit it to the standard output; otherwise, error out. If you want to make sure that the output actually names an object in your object database and/or can be used as a specific type of object you require, you can add the ^{type} peeling operator to the parameter. For example, git rev-parse \"$VAR^{commit}\" will make sure $VAR names an existing object that is a commit-ish (i.e. a commit, or an annotated tag that points at a commit). To make sure that $VAR names an existing object of any type, git rev-parse \"$VAR^{object}\" can be used. Note that if you are verifying a name from an untrusted source, it is wise to use --end-of-options so that the name argument is not mistaken for another option."
            },
            {
                "flag": "-q",
                "long": "--quiet",
                "arg": null,
                "description": "Only meaningful in --verify mode. Do not output an error message if the first argument is not a valid object name; instead exit with non-zero status silently. SHA-1s for valid object names are printed to stdout on success."
            },
            {
                "flag": "",
                "long": "--sq",
                "arg": null,
                "description": "Usually the output is made one line per flag and parameter. This option makes output a single line, properly quoted for consumption by shell. Useful when you expect your parameter to contain whitespaces and newlines (e.g. when using pickaxe -S with git diff-*). In contrast to the --sq-quote option, the command input is still interpreted as usual."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Same as --verify but shortens the object name to a unique prefix with at least length characters. The minimum length is 4, the default is the effective value of the core.abbrev configuration variable (see git-config(1))."
            },
            {
                "flag": "",
                "long": "--not",
                "arg": null,
                "description": "When showing object names, prefix them with ^ and strip ^ prefix from the object names that already have one."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "A non-ambiguous short name of the objects name. The option core.warnAmbiguousRefs is used to select the strict abbreviation mode."
            },
            {
                "flag": "",
                "long": "--symbolic",
                "arg": null,
                "description": "Usually the object names are output in SHA-1 form (with possible ^ prefix); this option makes them output in a form as close to the original input as possible."
            },
            {
                "flag": "",
                "long": "--symbolic-full-name",
                "arg": null,
                "description": "This is similar to --symbolic, but it omits input that are not refs (i.e. branch or tag names; or more explicitly disambiguating \"heads/master\" form, when you want to name the \"master\" branch when there is an unfortunately named tag \"master\"), and show them as full refnames (e.g. \"refs/heads/master\")."
            },
            {
                "flag": "",
                "long": "--all",
                "arg": null,
                "description": "Show all refs found in refs/."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Show all branches, tags, or remote-tracking branches, respectively (i.e., refs found in refs/heads, refs/tags, or refs/remotes, respectively). If a pattern is given, only refs matching the given shell glob are shown. If the pattern does not contain a globbing character (?, *, or [), it is turned into a prefix match by appending /*. --glob=pattern Show all refs matching the shell glob pattern pattern. If the pattern does not start with refs/, this is automatically prepended. If the pattern does not contain a globbing character (?, *, or [), it is turned into a prefix match by appending /*. --exclude=<glob-pattern> Do not include refs matching <glob-pattern> that the next --all, --branches, --tags, --remotes, or --glob would otherwise consider. Repetitions of this option accumulate exclusion patterns up to the next --all, --branches, --tags, --remotes, or --glob option (other options or arguments do not clear accumulated patterns). The patterns given should not begin with refs/heads, refs/tags, or refs/remotes when applied to --branches, --tags, or --remotes, respectively, and they must begin with refs/ when applied to --glob or --all. If a trailing /* is intended, it must be given explicitly. --disambiguate=<prefix> Show every object whose name begins with the given prefix. The <prefix> must be at least 4 hexadecimal digits long to avoid listing each and every object in the repository by mistake."
            },
            {
                "flag": "",
                "long": "--local-env-vars",
                "arg": null,
                "description": "List the GIT* environment variables that are local to the repository (e.g. GITDIR or GITWORKTREE, but not GITEDITOR). Only the names of the variables are listed, not their value, even if they are set. --path-format=(absolute|relative) Controls the behavior of certain other options. If specified as absolute, the paths printed by those options will be absolute and canonical. If specified as relative, the paths will be relative to the current working directory if that is possible. The default is option specific. This option may be specified multiple times and affects only the arguments that follow it on the command line, either to the end of the command line or the next instance of this option. The following options are modified by --path-format:"
            },
            {
                "flag": "",
                "long": "--git-dir",
                "arg": null,
                "description": "Show $GITDIR if defined. Otherwise show the path to the .git directory. The path shown, when relative, is relative to the current working directory. If $GITDIR is not defined and the current directory is not detected to lie in a Git repository or work tree print a message to stderr and exit with nonzero status."
            },
            {
                "flag": "",
                "long": "--git-common-dir",
                "arg": null,
                "description": "Show $GITCOMMONDIR if defined, else $GITDIR."
            },
            {
                "flag": "",
                "long": "--resolve-git-dir",
                "arg": "<path>",
                "description": "Check if <path> is a valid repository or a gitfile that points at a valid repository, and print the location of the repository. If <path> is a gitfile then the resolved path to the real repository is printed."
            },
            {
                "flag": "",
                "long": "--git-path",
                "arg": "<path>",
                "description": "Resolve \"$GITDIR/<path>\" and takes other path relocation variables such as $GITOBJECTDIRECTORY, $GITINDEXFILE... into account. For example, if $GITOBJECTDIRECTORY is set to /foo/bar then \"git rev-parse --git-path objects/abc\" returns /foo/bar/abc."
            },
            {
                "flag": "",
                "long": "--show-toplevel",
                "arg": null,
                "description": "Show the (by default, absolute) path of the top-level directory of the working tree. If there is no working tree, report an error."
            },
            {
                "flag": "",
                "long": "--show-superproject-working-tree",
                "arg": null,
                "description": "Show the absolute path of the root of the superproject’s working tree (if exists) that uses the current repository as its submodule. Outputs nothing if the current repository is not used as a submodule by any project."
            },
            {
                "flag": "",
                "long": "--shared-index-path",
                "arg": null,
                "description": "Show the path to the shared index file in split index mode, or empty if not in split-index mode. The following options are unaffected by --path-format:"
            },
            {
                "flag": "",
                "long": "--absolute-git-dir",
                "arg": null,
                "description": "Like --git-dir, but its output is always the canonicalized absolute path."
            },
            {
                "flag": "",
                "long": "--is-inside-git-dir",
                "arg": null,
                "description": "When the current working directory is below the repository directory print \"true\", otherwise \"false\"."
            },
            {
                "flag": "",
                "long": "--is-inside-work-tree",
                "arg": null,
                "description": "When the current working directory is inside the work tree of the repository print \"true\", otherwise \"false\"."
            },
            {
                "flag": "",
                "long": "--is-bare-repository",
                "arg": null,
                "description": "When the repository is bare print \"true\", otherwise \"false\"."
            },
            {
                "flag": "",
                "long": "--is-shallow-repository",
                "arg": null,
                "description": "When the repository is shallow print \"true\", otherwise \"false\"."
            },
            {
                "flag": "",
                "long": "--show-cdup",
                "arg": null,
                "description": "When the command is invoked from a subdirectory, show the path of the top-level directory relative to the current directory (typically a sequence of \"../\", or an empty string)."
            },
            {
                "flag": "",
                "long": "--show-prefix",
                "arg": null,
                "description": "When the command is invoked from a subdirectory, show the path of the current directory relative to the top-level directory."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Show the object format (hash algorithm) used for the repository for storage inside the .git directory, input, or output. For input, multiple algorithms may be printed, space-separated. If not specified, the default is \"storage\"."
            }
        ],
        "examples": [
            "•   Print the object name of the current commit:",
            "$ git rev-parse --verify HEAD",
            "•   Print the commit object name from the revision in the $REV shell variable:",
            "$ git rev-parse --verify --end-of-options $REV^{commit}",
            "This will error out if $REV is empty or not a valid revision.",
            "•   Similar to above:",
            "$ git rev-parse --default master --verify --end-of-options $REV",
            "but if $REV is empty, the commit object name from master will be printed."
        ],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Operation Modes",
                        "lines": 2
                    },
                    {
                        "name": "--parseopt",
                        "lines": 2,
                        "long": "--parseopt"
                    },
                    {
                        "name": "--sq-quote",
                        "lines": 3,
                        "long": "--sq-quote"
                    },
                    {
                        "name": "Options for --parseopt",
                        "lines": 1
                    },
                    {
                        "name": "--keep-dashdash",
                        "lines": 3,
                        "long": "--keep-dashdash"
                    },
                    {
                        "name": "--stop-at-non-option",
                        "lines": 3,
                        "long": "--stop-at-non-option"
                    },
                    {
                        "name": "--stuck-long",
                        "lines": 3,
                        "long": "--stuck-long"
                    },
                    {
                        "name": "Options for Filtering",
                        "lines": 1
                    },
                    {
                        "name": "--revs-only",
                        "lines": 2,
                        "long": "--revs-only"
                    },
                    {
                        "name": "--no-revs",
                        "lines": 2,
                        "long": "--no-revs"
                    },
                    {
                        "name": "--flags",
                        "lines": 2,
                        "long": "--flags"
                    },
                    {
                        "name": "--no-flags",
                        "lines": 2,
                        "long": "--no-flags"
                    },
                    {
                        "name": "Options for Output",
                        "lines": 1
                    },
                    {
                        "name": "--default <arg>",
                        "lines": 2,
                        "long": "--default",
                        "arg": "<arg>"
                    },
                    {
                        "name": "--prefix <arg>",
                        "lines": 13,
                        "long": "--prefix",
                        "arg": "<arg>"
                    },
                    {
                        "name": "--verify",
                        "lines": 14,
                        "long": "--verify"
                    },
                    {
                        "name": "-q, --quiet",
                        "lines": 4,
                        "flag": "-q",
                        "long": "--quiet"
                    },
                    {
                        "name": "--sq",
                        "lines": 6,
                        "long": "--sq"
                    },
                    {
                        "name": "--short[=length]",
                        "lines": 4
                    },
                    {
                        "name": "--not",
                        "lines": 3,
                        "long": "--not"
                    },
                    {
                        "name": "--abbrev-ref[=(strict|loose)]",
                        "lines": 3
                    },
                    {
                        "name": "--symbolic",
                        "lines": 3,
                        "long": "--symbolic"
                    },
                    {
                        "name": "--symbolic-full-name",
                        "lines": 5,
                        "long": "--symbolic-full-name"
                    },
                    {
                        "name": "Options for Objects",
                        "lines": 1
                    },
                    {
                        "name": "--all",
                        "lines": 2,
                        "long": "--all"
                    },
                    {
                        "name": "--branches[=pattern], --tags[=pattern], --remotes[=pattern]",
                        "lines": 28
                    },
                    {
                        "name": "Options for Files",
                        "lines": 1
                    },
                    {
                        "name": "--local-env-vars",
                        "lines": 16,
                        "long": "--local-env-vars"
                    },
                    {
                        "name": "--git-dir",
                        "lines": 6,
                        "long": "--git-dir"
                    },
                    {
                        "name": "--git-common-dir",
                        "lines": 2,
                        "long": "--git-common-dir"
                    },
                    {
                        "name": "--resolve-git-dir <path>",
                        "lines": 4,
                        "long": "--resolve-git-dir",
                        "arg": "<path>"
                    },
                    {
                        "name": "--git-path <path>",
                        "lines": 5,
                        "long": "--git-path",
                        "arg": "<path>"
                    },
                    {
                        "name": "--show-toplevel",
                        "lines": 3,
                        "long": "--show-toplevel"
                    },
                    {
                        "name": "--show-superproject-working-tree",
                        "lines": 4,
                        "long": "--show-superproject-working-tree"
                    },
                    {
                        "name": "--shared-index-path",
                        "lines": 5,
                        "long": "--shared-index-path"
                    },
                    {
                        "name": "--absolute-git-dir",
                        "lines": 2,
                        "long": "--absolute-git-dir"
                    },
                    {
                        "name": "--is-inside-git-dir",
                        "lines": 3,
                        "long": "--is-inside-git-dir"
                    },
                    {
                        "name": "--is-inside-work-tree",
                        "lines": 3,
                        "long": "--is-inside-work-tree"
                    },
                    {
                        "name": "--is-bare-repository",
                        "lines": 2,
                        "long": "--is-bare-repository"
                    },
                    {
                        "name": "--is-shallow-repository",
                        "lines": 2,
                        "long": "--is-shallow-repository"
                    },
                    {
                        "name": "--show-cdup",
                        "lines": 3,
                        "long": "--show-cdup"
                    },
                    {
                        "name": "--show-prefix",
                        "lines": 3,
                        "long": "--show-prefix"
                    },
                    {
                        "name": "--show-object-format[=(storage|input|output)]",
                        "lines": 4
                    },
                    {
                        "name": "Other Options",
                        "lines": 11
                    }
                ]
            },
            {
                "name": "SPECIFYING REVISIONS",
                "lines": 195,
                "subsections": []
            },
            {
                "name": "SPECIFYING RANGES",
                "lines": 14,
                "subsections": [
                    {
                        "name": "Commit Exclusions",
                        "lines": 5
                    },
                    {
                        "name": "Dotted Range Notations",
                        "lines": 33
                    },
                    {
                        "name": "Other <rev>^ Parent Shorthand Notations",
                        "lines": 16
                    }
                ]
            },
            {
                "name": "REVISION RANGE SUMMARY",
                "lines": 51,
                "subsections": []
            },
            {
                "name": "PARSEOPT",
                "lines": 11,
                "subsections": [
                    {
                        "name": "Input Format",
                        "lines": 10
                    },
                    {
                        "name": "<opt-spec>",
                        "lines": 4
                    },
                    {
                        "name": "<flags>",
                        "lines": 12
                    },
                    {
                        "name": "<arg-hint>",
                        "lines": 10
                    },
                    {
                        "name": "Example",
                        "lines": 18
                    },
                    {
                        "name": "Usage text",
                        "lines": 16
                    }
                ]
            },
            {
                "name": "SQ-QUOTE",
                "lines": 7,
                "subsections": [
                    {
                        "name": "Example",
                        "lines": 11
                    }
                ]
            },
            {
                "name": "EXAMPLES",
                "lines": 17,
                "subsections": []
            },
            {
                "name": "GIT",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}