{
    "content": [
        {
            "type": "text",
            "text": "# git-show (man)\n\n## NAME\n\ngit-show - Show various types of objects\n\n## SYNOPSIS\n\ngit show [<options>] [<object>...]\n\n## DESCRIPTION\n\nShows one or more objects (blobs, trees, tags and commits).\n\n## TLDR\n\n> Show various types of Git objects (commits, tags, etc.).\n\n- Show information about the latest commit (hash, message, changes, and other metadata):\n  `git show`\n- Show information about a specific commit, tag, or branch (such as `HEAD` for the latest commit):\n  `git show {{commit|tag|branch}}`\n- Show only the list of added, renamed, or deleted files:\n  `git show --summary {{commit}}`\n- Show information about the 3rd commit from the `HEAD` of a branch:\n  `git show {{branch}}~{{3}}`\n- Show a commit's message in a single line, suppressing the diff output:\n  `git show --oneline {{-s|--no-patch}} {{commit}}`\n- Show only statistics (added/removed characters) about the changed files:\n  `git show --stat {{commit}}`\n- Show a simplified list of all files changed in a commit (modified, added, and deleted):\n  `git show --name-only {{commit}}`\n- Show the contents of a file as it was at a given revision (e.g. branch, tag, or commit):\n  `git show {{revision}}:{{path/to/file}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (5 subsections)\n- **PRETTY FORMATS**\n- **DIFF FORMATTING** (49 subsections)\n- **GENERATING PATCH TEXT WITH -P**\n- **COMBINED DIFF FORMAT**\n- **EXAMPLES** (5 subsections)\n- **DISCUSSION**\n- **GIT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "git-show",
        "section": "",
        "mode": "man",
        "summary": "git-show - Show various types of objects",
        "synopsis": "git show [<options>] [<object>...]",
        "tldr_summary": "Show various types of Git objects (commits, tags, etc.).",
        "tldr_examples": [
            {
                "description": "Show information about the latest commit (hash, message, changes, and other metadata)",
                "command": "git show"
            },
            {
                "description": "Show information about a specific commit, tag, or branch (such as `HEAD` for the latest commit)",
                "command": "git show {{commit|tag|branch}}"
            },
            {
                "description": "Show only the list of added, renamed, or deleted files",
                "command": "git show --summary {{commit}}"
            },
            {
                "description": "Show information about the 3rd commit from the `HEAD` of a branch",
                "command": "git show {{branch}}~{{3}}"
            },
            {
                "description": "Show a commit's message in a single line, suppressing the diff output",
                "command": "git show --oneline {{-s|--no-patch}} {{commit}}"
            },
            {
                "description": "Show only statistics (added/removed characters) about the changed files",
                "command": "git show --stat {{commit}}"
            },
            {
                "description": "Show a simplified list of all files changed in a commit (modified, added, and deleted)",
                "command": "git show --name-only {{commit}}"
            },
            {
                "description": "Show the contents of a file as it was at a given revision (e.g. branch, tag, or commit)",
                "command": "git show {{revision}}:{{path/to/file}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "",
                "long": "--abbrev-commit",
                "arg": null,
                "description": "Instead of showing the full 40-byte hexadecimal commit object name, show a prefix that names the object uniquely. \"--abbrev=<n>\" (which also modifies diff output, if it is displayed) option can be used to specify the minimum length of the prefix. This should make \"--pretty=oneline\" a whole lot more readable for people using 80-column terminals."
            },
            {
                "flag": "",
                "long": "--no-abbrev-commit",
                "arg": null,
                "description": "Show the full 40-byte hexadecimal commit object name. This negates --abbrev-commit, either explicit or implied by other options such as \"--oneline\". It also overrides the log.abbrevCommit variable."
            },
            {
                "flag": "",
                "long": "--oneline",
                "arg": null,
                "description": "This is a shorthand for \"--pretty=oneline --abbrev-commit\" used together. --encoding=<encoding> Commit objects record the character encoding used for the log message in their encoding header; this option can be used to tell the command to re-code the commit log message in the encoding preferred by the user. For non plumbing commands this defaults to UTF-8. Note that if an object claims to be encoded in X and we are outputting in X, we will output the object verbatim; this means that invalid sequences in the original commit may be copied to the output. Likewise, if iconv(3) fails to convert the commit, we will quietly output the original object verbatim. --expand-tabs=<n>, --expand-tabs, --no-expand-tabs Perform a tab expansion (replace each tab with enough spaces to fill to the next display column that is multiple of <n>) in the log message before showing it in the output. --expand-tabs is a short-hand for --expand-tabs=8, and --no-expand-tabs is a short-hand for --expand-tabs=0, which disables tab expansion. By default, tabs are expanded in pretty formats that indent the log message by 4 spaces (i.e. medium, which is the default, full, and fuller). --notes[=<ref>] Show the notes (see git-notes(1)) that annotate the commit, when showing the commit log message. This is the default for git log, git show and git whatchanged commands when there is no --pretty, --format, or --oneline option given on the command line. By default, the notes shown are from the notes refs listed in the core.notesRef and notes.displayRef variables (or corresponding environment overrides). See git-config(1) for more details. With an optional <ref> argument, use the ref to find the notes to display. The ref can specify the full refname when it begins with refs/notes/; when it begins with notes/, refs/ and otherwise refs/notes/ is prefixed to form a full name of the ref. Multiple --notes options can be combined to control which notes are being displayed. Examples: \"--notes=foo\" will show only notes from \"refs/notes/foo\"; \"--notes=foo --notes\" will show both notes from \"refs/notes/foo\" and from the default notes ref(s)."
            },
            {
                "flag": "",
                "long": "--no-notes",
                "arg": null,
                "description": "Do not show notes. This negates the above --notes option, by resetting the list of notes refs from which notes are shown. Options are parsed in the order given on the command line, so e.g. \"--notes --notes=foo --no-notes --notes=bar\" will only show notes from \"refs/notes/bar\". --show-notes[=<ref>], --[no-]standard-notes These options are deprecated. Use the above --notes/--no-notes options instead."
            },
            {
                "flag": "",
                "long": "--show-signature",
                "arg": null,
                "description": "Check the validity of a signed commit object by passing the signature to gpg --verify and show the output."
            }
        ],
        "examples": [
            "Shows the tag v1.0.0, along with the object the tags points at.",
            "Shows the tree pointed to by the tag v1.0.0.",
            "Shows the subject of the commit pointed to by the tag v1.0.0.",
            "Shows the contents of the file Documentation/README as they were current in the 10th last",
            "commit of the branch next.",
            "Concatenates the contents of said Makefiles in the head of the branch master."
        ],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 16,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 16,
                "subsections": [
                    {
                        "name": "--abbrev-commit",
                        "lines": 7,
                        "long": "--abbrev-commit"
                    },
                    {
                        "name": "--no-abbrev-commit",
                        "lines": 4,
                        "long": "--no-abbrev-commit"
                    },
                    {
                        "name": "--oneline",
                        "lines": 37,
                        "long": "--oneline"
                    },
                    {
                        "name": "--no-notes",
                        "lines": 8,
                        "long": "--no-notes"
                    },
                    {
                        "name": "--show-signature",
                        "lines": 3,
                        "long": "--show-signature"
                    }
                ]
            },
            {
                "name": "PRETTY FORMATS",
                "lines": 444,
                "subsections": []
            },
            {
                "name": "DIFF FORMATTING",
                "lines": 2,
                "subsections": [
                    {
                        "name": "-p, -u, --patch",
                        "lines": 2,
                        "flag": "-u",
                        "long": "--patch"
                    },
                    {
                        "name": "-s, --no-patch",
                        "lines": 4,
                        "flag": "-s",
                        "long": "--no-patch"
                    },
                    {
                        "name": "--no-diff-merges",
                        "lines": 31,
                        "long": "--no-diff-merges"
                    },
                    {
                        "name": "--combined-all-paths",
                        "lines": 16,
                        "long": "--combined-all-paths"
                    },
                    {
                        "name": "--raw",
                        "lines": 4,
                        "long": "--raw"
                    },
                    {
                        "name": "--patch-with-raw",
                        "lines": 2,
                        "long": "--patch-with-raw"
                    },
                    {
                        "name": "-t",
                        "lines": 2,
                        "flag": "-t"
                    },
                    {
                        "name": "--indent-heuristic",
                        "lines": 3,
                        "long": "--indent-heuristic"
                    },
                    {
                        "name": "--no-indent-heuristic",
                        "lines": 2,
                        "long": "--no-indent-heuristic"
                    },
                    {
                        "name": "--minimal",
                        "lines": 2,
                        "long": "--minimal"
                    },
                    {
                        "name": "--patience",
                        "lines": 2,
                        "long": "--patience"
                    },
                    {
                        "name": "--histogram",
                        "lines": 43,
                        "long": "--histogram"
                    },
                    {
                        "name": "--compact-summary",
                        "lines": 5,
                        "long": "--compact-summary"
                    },
                    {
                        "name": "--numstat",
                        "lines": 4,
                        "long": "--numstat"
                    },
                    {
                        "name": "--shortstat",
                        "lines": 41,
                        "long": "--shortstat"
                    },
                    {
                        "name": "--cumulative",
                        "lines": 5,
                        "long": "--cumulative"
                    },
                    {
                        "name": "--summary",
                        "lines": 3,
                        "long": "--summary"
                    },
                    {
                        "name": "--patch-with-stat",
                        "lines": 2,
                        "long": "--patch-with-stat"
                    },
                    {
                        "name": "-z",
                        "lines": 8,
                        "flag": "-z"
                    },
                    {
                        "name": "--name-only",
                        "lines": 3,
                        "long": "--name-only"
                    },
                    {
                        "name": "--name-status",
                        "lines": 17,
                        "long": "--name-status"
                    },
                    {
                        "name": "--no-color",
                        "lines": 34,
                        "long": "--no-color"
                    },
                    {
                        "name": "--no-color-moved",
                        "lines": 26,
                        "long": "--no-color-moved"
                    },
                    {
                        "name": "--no-color-moved-ws",
                        "lines": 48,
                        "long": "--no-color-moved-ws"
                    },
                    {
                        "name": "--no-renames",
                        "lines": 5,
                        "long": "--no-renames"
                    },
                    {
                        "name": "--check",
                        "lines": 14,
                        "long": "--check"
                    },
                    {
                        "name": "--full-index",
                        "lines": 3,
                        "long": "--full-index"
                    },
                    {
                        "name": "--binary",
                        "lines": 41,
                        "long": "--binary"
                    },
                    {
                        "name": "--find-copies-harder",
                        "lines": 6,
                        "long": "--find-copies-harder"
                    },
                    {
                        "name": "-D, --irreversible-delete",
                        "lines": 9,
                        "flag": "-D",
                        "long": "--irreversible-delete"
                    },
                    {
                        "name": "-l<num>",
                        "lines": 25
                    },
                    {
                        "name": "-S<string>",
                        "lines": 10
                    },
                    {
                        "name": "-G<regex>",
                        "lines": 26
                    },
                    {
                        "name": "--pickaxe-all",
                        "lines": 3,
                        "long": "--pickaxe-all"
                    },
                    {
                        "name": "--pickaxe-regex",
                        "lines": 2,
                        "long": "--pickaxe-regex"
                    },
                    {
                        "name": "-O<orderfile>",
                        "lines": 30
                    },
                    {
                        "name": "-R",
                        "lines": 9,
                        "flag": "-R"
                    },
                    {
                        "name": "-a, --text",
                        "lines": 2,
                        "flag": "-a",
                        "long": "--text"
                    },
                    {
                        "name": "--ignore-cr-at-eol",
                        "lines": 2,
                        "long": "--ignore-cr-at-eol"
                    },
                    {
                        "name": "--ignore-space-at-eol",
                        "lines": 2,
                        "long": "--ignore-space-at-eol"
                    },
                    {
                        "name": "-b, --ignore-space-change",
                        "lines": 3,
                        "flag": "-b",
                        "long": "--ignore-space-change"
                    },
                    {
                        "name": "-w, --ignore-all-space",
                        "lines": 3,
                        "flag": "-w",
                        "long": "--ignore-all-space"
                    },
                    {
                        "name": "--ignore-blank-lines",
                        "lines": 11,
                        "long": "--ignore-blank-lines"
                    },
                    {
                        "name": "-W, --function-context",
                        "lines": 4,
                        "flag": "-W",
                        "long": "--function-context"
                    },
                    {
                        "name": "--ext-diff",
                        "lines": 3,
                        "long": "--ext-diff"
                    },
                    {
                        "name": "--no-ext-diff",
                        "lines": 2,
                        "long": "--no-ext-diff"
                    },
                    {
                        "name": "--textconv, --no-textconv",
                        "lines": 23,
                        "long": "--no-textconv"
                    },
                    {
                        "name": "--no-prefix",
                        "lines": 5,
                        "long": "--no-prefix"
                    },
                    {
                        "name": "--ita-invisible-in-index",
                        "lines": 7,
                        "long": "--ita-invisible-in-index"
                    }
                ]
            },
            {
                "name": "GENERATING PATCH TEXT WITH -P",
                "lines": 63,
                "subsections": []
            },
            {
                "name": "COMBINED DIFF FORMAT",
                "lines": 109,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 1,
                "subsections": [
                    {
                        "name": "git show v1.0.0",
                        "lines": 2
                    },
                    {
                        "name": "git show v1.0.0^{tree}",
                        "lines": 2
                    },
                    {
                        "name": "git show -s --format=%s v1.0.0^{commit}",
                        "lines": 2
                    },
                    {
                        "name": "git show next~10:Documentation/README",
                        "lines": 3
                    },
                    {
                        "name": "git show master:Makefile master:t/Makefile",
                        "lines": 2
                    }
                ]
            },
            {
                "name": "DISCUSSION",
                "lines": 53,
                "subsections": []
            },
            {
                "name": "GIT",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "git-show - Show various types of objects\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "git show [<options>] [<object>...]\n\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Shows one or more objects (blobs, trees, tags and commits).\n\nFor commits it shows the log message and textual diff. It also presents the merge commit in a\nspecial format as produced by git diff-tree --cc.\n\nFor tags, it shows the tag message and the referenced objects.\n\nFor trees, it shows the names (equivalent to git ls-tree with --name-only).\n\nFor plain blobs, it shows the plain contents.\n\nThe command takes options applicable to the git diff-tree command to control how the changes\nthe commit introduces are shown.\n\nThis manual page describes only the most frequently used options.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "<object>...\nThe names of objects to show (defaults to HEAD). For a more complete list of ways to\nspell object names, see \"SPECIFYING REVISIONS\" section in gitrevisions(7).\n\n--pretty[=<format>], --format=<format>\nPretty-print the contents of the commit logs in a given format, where <format> can be one\nof oneline, short, medium, full, fuller, reference, email, raw, format:<string> and\ntformat:<string>. When <format> is none of the above, and has %placeholder in it, it acts\nas if --pretty=tformat:<format> were given.\n\nSee the \"PRETTY FORMATS\" section for some additional details for each format. When\n=<format> part is omitted, it defaults to medium.\n\nNote: you can specify the default pretty format in the repository configuration (see git-\nconfig(1)).\n",
                "subsections": [
                    {
                        "name": "--abbrev-commit",
                        "content": "Instead of showing the full 40-byte hexadecimal commit object name, show a prefix that\nnames the object uniquely. \"--abbrev=<n>\" (which also modifies diff output, if it is\ndisplayed) option can be used to specify the minimum length of the prefix.\n\nThis should make \"--pretty=oneline\" a whole lot more readable for people using 80-column\nterminals.\n",
                        "long": "--abbrev-commit"
                    },
                    {
                        "name": "--no-abbrev-commit",
                        "content": "Show the full 40-byte hexadecimal commit object name. This negates --abbrev-commit,\neither explicit or implied by other options such as \"--oneline\". It also overrides the\nlog.abbrevCommit variable.\n",
                        "long": "--no-abbrev-commit"
                    },
                    {
                        "name": "--oneline",
                        "content": "This is a shorthand for \"--pretty=oneline --abbrev-commit\" used together.\n\n--encoding=<encoding>\nCommit objects record the character encoding used for the log message in their encoding\nheader; this option can be used to tell the command to re-code the commit log message in\nthe encoding preferred by the user. For non plumbing commands this defaults to UTF-8.\nNote that if an object claims to be encoded in X and we are outputting in X, we will\noutput the object verbatim; this means that invalid sequences in the original commit may\nbe copied to the output. Likewise, if iconv(3) fails to convert the commit, we will\nquietly output the original object verbatim.\n\n--expand-tabs=<n>, --expand-tabs, --no-expand-tabs\nPerform a tab expansion (replace each tab with enough spaces to fill to the next display\ncolumn that is multiple of <n>) in the log message before showing it in the output.\n--expand-tabs is a short-hand for --expand-tabs=8, and --no-expand-tabs is a short-hand\nfor --expand-tabs=0, which disables tab expansion.\n\nBy default, tabs are expanded in pretty formats that indent the log message by 4 spaces\n(i.e.  medium, which is the default, full, and fuller).\n\n--notes[=<ref>]\nShow the notes (see git-notes(1)) that annotate the commit, when showing the commit log\nmessage. This is the default for git log, git show and git whatchanged commands when\nthere is no --pretty, --format, or --oneline option given on the command line.\n\nBy default, the notes shown are from the notes refs listed in the core.notesRef and\nnotes.displayRef variables (or corresponding environment overrides). See git-config(1)\nfor more details.\n\nWith an optional <ref> argument, use the ref to find the notes to display. The ref can\nspecify the full refname when it begins with refs/notes/; when it begins with notes/,\nrefs/ and otherwise refs/notes/ is prefixed to form a full name of the ref.\n\nMultiple --notes options can be combined to control which notes are being displayed.\nExamples: \"--notes=foo\" will show only notes from \"refs/notes/foo\"; \"--notes=foo --notes\"\nwill show both notes from \"refs/notes/foo\" and from the default notes ref(s).\n",
                        "long": "--oneline"
                    },
                    {
                        "name": "--no-notes",
                        "content": "Do not show notes. This negates the above --notes option, by resetting the list of notes\nrefs from which notes are shown. Options are parsed in the order given on the command\nline, so e.g. \"--notes --notes=foo --no-notes --notes=bar\" will only show notes from\n\"refs/notes/bar\".\n\n--show-notes[=<ref>], --[no-]standard-notes\nThese options are deprecated. Use the above --notes/--no-notes options instead.\n",
                        "long": "--no-notes"
                    },
                    {
                        "name": "--show-signature",
                        "content": "Check the validity of a signed commit object by passing the signature to gpg --verify and\nshow the output.\n",
                        "long": "--show-signature"
                    }
                ]
            },
            "PRETTY FORMATS": {
                "content": "If the commit is a merge, and if the pretty-format is not oneline, email or raw, an\nadditional line is inserted before the Author: line. This line begins with \"Merge: \" and the\nhashes of ancestral commits are printed, separated by spaces. Note that the listed commits\nmay not necessarily be the list of the direct parent commits if you have limited your view of\nhistory: for example, if you are only interested in changes related to a certain directory or\nfile.\n\nThere are several built-in formats, and you can define additional formats by setting a\npretty.<name> config option to either another format name, or a format: string, as described\nbelow (see git-config(1)). Here are the details of the built-in formats:\n\n•   oneline\n\n<hash> <title line>\n\nThis is designed to be as compact as possible.\n\n•   short\n\ncommit <hash>\nAuthor: <author>\n\n<title line>\n\n•   medium\n\ncommit <hash>\nAuthor: <author>\nDate:   <author date>\n\n<title line>\n\n<full commit message>\n\n•   full\n\ncommit <hash>\nAuthor: <author>\nCommit: <committer>\n\n<title line>\n\n<full commit message>\n\n•   fuller\n\ncommit <hash>\nAuthor:     <author>\nAuthorDate: <author date>\nCommit:     <committer>\nCommitDate: <committer date>\n\n<title line>\n\n<full commit message>\n\n•   reference\n\n<abbrev hash> (<title line>, <short author date>)\n\nThis format is used to refer to another commit in a commit message and is the same as\n--pretty='format:%C(auto)%h (%s, %ad)'. By default, the date is formatted with\n--date=short unless another --date option is explicitly specified. As with any format:\nwith format placeholders, its output is not affected by other options like --decorate and\n--walk-reflogs.\n\n•   email\n\nFrom <hash> <date>\nFrom: <author>\nDate: <author date>\nSubject: [PATCH] <title line>\n\n<full commit message>\n\n•   mboxrd\n\nLike email, but lines in the commit message starting with \"From \" (preceded by zero or\nmore \">\") are quoted with \">\" so they aren’t confused as starting a new commit.\n\n•   raw\n\nThe raw format shows the entire commit exactly as stored in the commit object. Notably,\nthe hashes are displayed in full, regardless of whether --abbrev or --no-abbrev are used,\nand parents information show the true parent commits, without taking grafts or history\nsimplification into account. Note that this format affects the way commits are displayed,\nbut not the way the diff is shown e.g. with git log --raw. To get full object names in a\nraw diff format, use --no-abbrev.\n\n•   format:<string>\n\nThe format:<string> format allows you to specify which information you want to show. It\nworks a little bit like printf format, with the notable exception that you get a newline\nwith %n instead of \\n.\n\nE.g, format:\"The author of %h was %an, %ar%nThe title was >>%s<<%n\" would show something\nlike this:\n\nThe author of fe6e0ee was Junio C Hamano, 23 hours ago\nThe title was >>t4119: test autocomputing -p<n> for traditional diff input.<<\n\nThe placeholders are:\n\n•   Placeholders that expand to a single literal character:\n\n%n\nnewline\n\n%%\na raw %\n\n%x00\nprint a byte from a hex code\n\n•   Placeholders that affect formatting of later placeholders:\n\n%Cred\nswitch color to red\n\n%Cgreen\nswitch color to green\n\n%Cblue\nswitch color to blue\n\n%Creset\nreset color\n\n%C(...)\ncolor specification, as described under Values in the \"CONFIGURATION FILE\"\nsection of git-config(1). By default, colors are shown only when enabled for log\noutput (by color.diff, color.ui, or --color, and respecting the auto settings of\nthe former if we are going to a terminal).  %C(auto,...)  is accepted as a\nhistorical synonym for the default (e.g., %C(auto,red)). Specifying\n%C(always,...)  will show the colors even when color is not otherwise enabled\n(though consider just using --color=always to enable color for the whole output,\nincluding this format and anything else git might color).  auto alone (i.e.\n%C(auto)) will turn on auto coloring on the next placeholders until the color is\nswitched again.\n\n%m\nleft (<), right (>) or boundary (-) mark\n\n%w([<w>[,<i1>[,<i2>]]])\nswitch line wrapping, like the -w option of git-shortlog(1).\n\n%<(<N>[,trunc|ltrunc|mtrunc])\nmake the next placeholder take at least N columns, padding spaces on the right if\nnecessary. Optionally truncate at the beginning (ltrunc), the middle (mtrunc) or\nthe end (trunc) if the output is longer than N columns. Note that truncating only\nworks correctly with N >= 2.\n\n%<|(<N>)\nmake the next placeholder take at least until Nth columns, padding spaces on the\nright if necessary\n\n%>(<N>), %>|(<N>)\nsimilar to %<(<N>), %<|(<N>) respectively, but padding spaces on the left\n\n%>>(<N>), %>>|(<N>)\nsimilar to %>(<N>), %>|(<N>) respectively, except that if the next placeholder\ntakes more spaces than given and there are spaces on its left, use those spaces\n\n%><(<N>), %><|(<N>)\nsimilar to %<(<N>), %<|(<N>) respectively, but padding both sides (i.e. the text\nis centered)\n\n•   Placeholders that expand to information extracted from the commit:\n\n%H\ncommit hash\n\n%h\nabbreviated commit hash\n\n%T\ntree hash\n\n%t\nabbreviated tree hash\n\n%P\nparent hashes\n\n%p\nabbreviated parent hashes\n\n%an\nauthor name\n\n%aN\nauthor name (respecting .mailmap, see git-shortlog(1) or git-blame(1))\n\n%ae\nauthor email\n\n%aE\nauthor email (respecting .mailmap, see git-shortlog(1) or git-blame(1))\n\n%al\nauthor email local-part (the part before the @ sign)\n\n%aL\nauthor local-part (see %al) respecting .mailmap, see git-shortlog(1) or git-\nblame(1))\n\n%ad\nauthor date (format respects --date= option)\n\n%aD\nauthor date, RFC2822 style\n\n%ar\nauthor date, relative\n\n%at\nauthor date, UNIX timestamp\n\n%ai\nauthor date, ISO 8601-like format\n\n%aI\nauthor date, strict ISO 8601 format\n\n%as\nauthor date, short format (YYYY-MM-DD)\n\n%ah\nauthor date, human style (like the --date=human option of git-rev-list(1))\n\n%cn\ncommitter name\n\n%cN\ncommitter name (respecting .mailmap, see git-shortlog(1) or git-blame(1))\n\n%ce\ncommitter email\n\n%cE\ncommitter email (respecting .mailmap, see git-shortlog(1) or git-blame(1))\n\n%cl\ncommitter email local-part (the part before the @ sign)\n\n%cL\ncommitter local-part (see %cl) respecting .mailmap, see git-shortlog(1) or git-\nblame(1))\n\n%cd\ncommitter date (format respects --date= option)\n\n%cD\ncommitter date, RFC2822 style\n\n%cr\ncommitter date, relative\n\n%ct\ncommitter date, UNIX timestamp\n\n%ci\ncommitter date, ISO 8601-like format\n\n%cI\ncommitter date, strict ISO 8601 format\n\n%cs\ncommitter date, short format (YYYY-MM-DD)\n\n%ch\ncommitter date, human style (like the --date=human option of git-rev-list(1))\n\n%d\nref names, like the --decorate option of git-log(1)\n\n%D\nref names without the \" (\", \")\" wrapping.\n\n%(describe[:options])\nhuman-readable name, like git-describe(1); empty string for undescribable\ncommits. The describe string may be followed by a colon and zero or more\ncomma-separated options. Descriptions can be inconsistent when tags are added or\nremoved at the same time.\n\n•   match=<pattern>: Only consider tags matching the given glob(7) pattern,\nexcluding the \"refs/tags/\" prefix.\n\n•   exclude=<pattern>: Do not consider tags matching the given glob(7) pattern,\nexcluding the \"refs/tags/\" prefix.\n\n%S\nref name given on the command line by which the commit was reached (like git log\n--source), only works with git log\n\n%e\nencoding\n\n%s\nsubject\n\n%f\nsanitized subject line, suitable for a filename\n\n%b\nbody\n\n%B\nraw body (unwrapped subject and body)\n\n%N\ncommit notes\n\n%GG\nraw verification message from GPG for a signed commit\n\n%G?\nshow \"G\" for a good (valid) signature, \"B\" for a bad signature, \"U\" for a good\nsignature with unknown validity, \"X\" for a good signature that has expired, \"Y\"\nfor a good signature made by an expired key, \"R\" for a good signature made by a\nrevoked key, \"E\" if the signature cannot be checked (e.g. missing key) and \"N\"\nfor no signature\n\n%GS\nshow the name of the signer for a signed commit\n\n%GK\nshow the key used to sign a signed commit\n\n%GF\nshow the fingerprint of the key used to sign a signed commit\n\n%GP\nshow the fingerprint of the primary key whose subkey was used to sign a signed\ncommit\n\n%GT\nshow the trust level for the key used to sign a signed commit\n\n%gD\nreflog selector, e.g., refs/stash@{1} or refs/stash@{2 minutes ago}; the format\nfollows the rules described for the -g option. The portion before the @ is the\nrefname as given on the command line (so git log -g refs/heads/master would yield\nrefs/heads/master@{0}).\n\n%gd\nshortened reflog selector; same as %gD, but the refname portion is shortened for\nhuman readability (so refs/heads/master becomes just master).\n\n%gn\nreflog identity name\n\n%gN\nreflog identity name (respecting .mailmap, see git-shortlog(1) or git-blame(1))\n\n%ge\nreflog identity email\n\n%gE\nreflog identity email (respecting .mailmap, see git-shortlog(1) or git-blame(1))\n\n%gs\nreflog subject\n\n%(trailers[:options])\ndisplay the trailers of the body as interpreted by git-interpret-trailers(1). The\ntrailers string may be followed by a colon and zero or more comma-separated\noptions. If any option is provided multiple times the last occurrence wins.\n\nThe boolean options accept an optional value [=<BOOL>]. The values true, false,\non, off etc. are all accepted. See the \"boolean\" sub-section in \"EXAMPLES\" in\ngit-config(1). If a boolean option is given with no value, it’s enabled.\n\n•   key=<K>: only show trailers with specified key. Matching is done\ncase-insensitively and trailing colon is optional. If option is given\nmultiple times trailer lines matching any of the keys are shown. This option\nautomatically enables the only option so that non-trailer lines in the\ntrailer block are hidden. If that is not desired it can be disabled with\nonly=false. E.g., %(trailers:key=Reviewed-by) shows trailer lines with key\nReviewed-by.\n\n•   only[=<BOOL>]: select whether non-trailer lines from the trailer block should\nbe included.\n\n•   separator=<SEP>: specify a separator inserted between trailer lines. When\nthis option is not given each trailer line is terminated with a line feed\ncharacter. The string SEP may contain the literal formatting codes described\nabove. To use comma as separator one must use %x2C as it would otherwise be\nparsed as next option. E.g., %(trailers:key=Ticket,separator=%x2C ) shows all\ntrailer lines whose key is \"Ticket\" separated by a comma and a space.\n\n•   unfold[=<BOOL>]: make it behave as if interpret-trailer’s --unfold option was\ngiven. E.g., %(trailers:only,unfold=true) unfolds and shows all trailer\nlines.\n\n•   keyonly[=<BOOL>]: only show the key part of the trailer.\n\n•   valueonly[=<BOOL>]: only show the value part of the trailer.\n\n•   keyvalueseparator=<SEP>: specify a separator inserted between trailer\nlines. When this option is not given each trailer key-value pair is separated\nby \": \". Otherwise it shares the same semantics as separator=<SEP> above.\n\nNote\nSome placeholders may depend on other options given to the revision traversal engine. For\nexample, the %g* reflog options will insert an empty string unless we are traversing\nreflog entries (e.g., by git log -g). The %d and %D placeholders will use the \"short\"\ndecoration format if --decorate was not already provided on the command line.\n\nIf you add a + (plus sign) after % of a placeholder, a line-feed is inserted immediately\nbefore the expansion if and only if the placeholder expands to a non-empty string.\n\nIf you add a - (minus sign) after % of a placeholder, all consecutive line-feeds immediately\npreceding the expansion are deleted if and only if the placeholder expands to an empty\nstring.\n\nIf you add a ` ` (space) after % of a placeholder, a space is inserted immediately before the\nexpansion if and only if the placeholder expands to a non-empty string.\n\n•   tformat:\n\nThe tformat: format works exactly like format:, except that it provides \"terminator\"\nsemantics instead of \"separator\" semantics. In other words, each commit has the message\nterminator character (usually a newline) appended, rather than a separator placed between\nentries. This means that the final entry of a single-line format will be properly\nterminated with a new line, just as the \"oneline\" format does. For example:\n\n$ git log -2 --pretty=format:%h 4da45bef \\\n| perl -pe '$ .= \" -- NO NEWLINE\\n\" unless /\\n/'\n4da45be\n7134973 -- NO NEWLINE\n\n$ git log -2 --pretty=tformat:%h 4da45bef \\\n| perl -pe '$ .= \" -- NO NEWLINE\\n\" unless /\\n/'\n4da45be\n7134973\n\nIn addition, any unrecognized string that has a % in it is interpreted as if it has\ntformat: in front of it. For example, these two are equivalent:\n\n$ git log -2 --pretty=tformat:%h 4da45bef\n$ git log -2 --pretty=%h 4da45bef\n\n",
                "subsections": []
            },
            "DIFF FORMATTING": {
                "content": "The options below can be used to change the way git show generates diff output.\n",
                "subsections": [
                    {
                        "name": "-p, -u, --patch",
                        "content": "Generate patch (see section on generating patches).\n",
                        "flag": "-u",
                        "long": "--patch"
                    },
                    {
                        "name": "-s, --no-patch",
                        "content": "Suppress diff output. Useful for commands like git show that show the patch by default,\nor to cancel the effect of --patch.\n\n--diff-merges=(off|none|on|first-parent|1|separate|m|combined|c|dense-combined|cc),",
                        "flag": "-s",
                        "long": "--no-patch"
                    },
                    {
                        "name": "--no-diff-merges",
                        "content": "Specify diff format to be used for merge commits. Default is dense-combined unless\n--first-parent is in use, in which case first-parent is the default.\n\n--diff-merges=(off|none), --no-diff-merges\nDisable output of diffs for merge commits. Useful to override implied value.\n\n--diff-merges=on, --diff-merges=m, -m\nThis option makes diff output for merge commits to be shown in the default format.\n-m will produce the output only if -p is given as well. The default format could be\nchanged using log.diffMerges configuration parameter, which default value is\nseparate.\n\n--diff-merges=first-parent, --diff-merges=1\nThis option makes merge commits show the full diff with respect to the first parent\nonly.\n\n--diff-merges=separate\nThis makes merge commits show the full diff with respect to each of the parents.\nSeparate log entry and diff is generated for each parent.\n\n--diff-merges=combined, --diff-merges=c, -c\nWith this option, diff output for a merge commit shows the differences from each of\nthe parents to the merge result simultaneously instead of showing pairwise diff\nbetween a parent and the result one at a time. Furthermore, it lists only files which\nwere modified from all parents.  -c implies -p.\n\n--diff-merges=dense-combined, --diff-merges=cc, --cc\nWith this option the output produced by --diff-merges=combined is further compressed\nby omitting uninteresting hunks whose contents in the parents have only two variants\nand the merge result picks one of them without modification.  --cc implies -p.\n",
                        "long": "--no-diff-merges"
                    },
                    {
                        "name": "--combined-all-paths",
                        "content": "This flag causes combined diffs (used for merge commits) to list the name of the file\nfrom all parents. It thus only has effect when --diff-merges=[dense-]combined is in use,\nand is likely only useful if filename changes are detected (i.e. when either rename or\ncopy detection have been requested).\n\n-U<n>, --unified=<n>\nGenerate diffs with <n> lines of context instead of the usual three. Implies --patch.\n\n--output=<file>\nOutput to a specific file instead of stdout.\n\n--output-indicator-new=<char>, --output-indicator-old=<char>,\n--output-indicator-context=<char>\nSpecify the character used to indicate new, old or context lines in the generated patch.\nNormally they are +, - and ' ' respectively.\n",
                        "long": "--combined-all-paths"
                    },
                    {
                        "name": "--raw",
                        "content": "For each commit, show a summary of changes using the raw diff format. See the \"RAW OUTPUT\nFORMAT\" section of git-diff(1). This is different from showing the log itself in raw\nformat, which you can achieve with --format=raw.\n",
                        "long": "--raw"
                    },
                    {
                        "name": "--patch-with-raw",
                        "content": "Synonym for -p --raw.\n",
                        "long": "--patch-with-raw"
                    },
                    {
                        "name": "-t",
                        "content": "Show the tree objects in the diff output.\n",
                        "flag": "-t"
                    },
                    {
                        "name": "--indent-heuristic",
                        "content": "Enable the heuristic that shifts diff hunk boundaries to make patches easier to read.\nThis is the default.\n",
                        "long": "--indent-heuristic"
                    },
                    {
                        "name": "--no-indent-heuristic",
                        "content": "Disable the indent heuristic.\n",
                        "long": "--no-indent-heuristic"
                    },
                    {
                        "name": "--minimal",
                        "content": "Spend extra time to make sure the smallest possible diff is produced.\n",
                        "long": "--minimal"
                    },
                    {
                        "name": "--patience",
                        "content": "Generate a diff using the \"patience diff\" algorithm.\n",
                        "long": "--patience"
                    },
                    {
                        "name": "--histogram",
                        "content": "Generate a diff using the \"histogram diff\" algorithm.\n\n--anchored=<text>\nGenerate a diff using the \"anchored diff\" algorithm.\n\nThis option may be specified more than once.\n\nIf a line exists in both the source and destination, exists only once, and starts with\nthis text, this algorithm attempts to prevent it from appearing as a deletion or addition\nin the output. It uses the \"patience diff\" algorithm internally.\n\n--diff-algorithm={patience|minimal|histogram|myers}\nChoose a diff algorithm. The variants are as follows:\n\ndefault, myers\nThe basic greedy diff algorithm. Currently, this is the default.\n\nminimal\nSpend extra time to make sure the smallest possible diff is produced.\n\npatience\nUse \"patience diff\" algorithm when generating patches.\n\nhistogram\nThis algorithm extends the patience algorithm to \"support low-occurrence common\nelements\".\n\nFor instance, if you configured the diff.algorithm variable to a non-default value and\nwant to use the default one, then you have to use --diff-algorithm=default option.\n\n--stat[=<width>[,<name-width>[,<count>]]]\nGenerate a diffstat. By default, as much space as necessary will be used for the filename\npart, and the rest for the graph part. Maximum width defaults to terminal width, or 80\ncolumns if not connected to a terminal, and can be overridden by <width>. The width of\nthe filename part can be limited by giving another width <name-width> after a comma. The\nwidth of the graph part can be limited by using --stat-graph-width=<width> (affects all\ncommands generating a stat graph) or by setting diff.statGraphWidth=<width> (does not\naffect git format-patch). By giving a third parameter <count>, you can limit the output\nto the first <count> lines, followed by ...  if there are more.\n\nThese parameters can also be set individually with --stat-width=<width>,\n--stat-name-width=<name-width> and --stat-count=<count>.\n",
                        "long": "--histogram"
                    },
                    {
                        "name": "--compact-summary",
                        "content": "Output a condensed summary of extended header information such as file creations or\ndeletions (\"new\" or \"gone\", optionally \"+l\" if it’s a symlink) and mode changes (\"+x\" or\n\"-x\" for adding or removing executable bit respectively) in diffstat. The information is\nput between the filename part and the graph part. Implies --stat.\n",
                        "long": "--compact-summary"
                    },
                    {
                        "name": "--numstat",
                        "content": "Similar to --stat, but shows number of added and deleted lines in decimal notation and\npathname without abbreviation, to make it more machine friendly. For binary files,\noutputs two - instead of saying 0 0.\n",
                        "long": "--numstat"
                    },
                    {
                        "name": "--shortstat",
                        "content": "Output only the last line of the --stat format containing total number of modified files,\nas well as number of added and deleted lines.\n\n-X[<param1,param2,...>], --dirstat[=<param1,param2,...>]\nOutput the distribution of relative amount of changes for each sub-directory. The\nbehavior of --dirstat can be customized by passing it a comma separated list of\nparameters. The defaults are controlled by the diff.dirstat configuration variable (see\ngit-config(1)). The following parameters are available:\n\nchanges\nCompute the dirstat numbers by counting the lines that have been removed from the\nsource, or added to the destination. This ignores the amount of pure code movements\nwithin a file. In other words, rearranging lines in a file is not counted as much as\nother changes. This is the default behavior when no parameter is given.\n\nlines\nCompute the dirstat numbers by doing the regular line-based diff analysis, and\nsumming the removed/added line counts. (For binary files, count 64-byte chunks\ninstead, since binary files have no natural concept of lines). This is a more\nexpensive --dirstat behavior than the changes behavior, but it does count rearranged\nlines within a file as much as other changes. The resulting output is consistent with\nwhat you get from the other --*stat options.\n\nfiles\nCompute the dirstat numbers by counting the number of files changed. Each changed\nfile counts equally in the dirstat analysis. This is the computationally cheapest\n--dirstat behavior, since it does not have to look at the file contents at all.\n\ncumulative\nCount changes in a child directory for the parent directory as well. Note that when\nusing cumulative, the sum of the percentages reported may exceed 100%. The default\n(non-cumulative) behavior can be specified with the noncumulative parameter.\n\n<limit>\nAn integer parameter specifies a cut-off percent (3% by default). Directories\ncontributing less than this percentage of the changes are not shown in the output.\n\nExample: The following will count changed files, while ignoring directories with less\nthan 10% of the total amount of changed files, and accumulating child directory counts in\nthe parent directories: --dirstat=files,10,cumulative.\n",
                        "long": "--shortstat"
                    },
                    {
                        "name": "--cumulative",
                        "content": "Synonym for --dirstat=cumulative\n\n--dirstat-by-file[=<param1,param2>...]\nSynonym for --dirstat=files,param1,param2...\n",
                        "long": "--cumulative"
                    },
                    {
                        "name": "--summary",
                        "content": "Output a condensed summary of extended header information such as creations, renames and\nmode changes.\n",
                        "long": "--summary"
                    },
                    {
                        "name": "--patch-with-stat",
                        "content": "Synonym for -p --stat.\n",
                        "long": "--patch-with-stat"
                    },
                    {
                        "name": "-z",
                        "content": "Separate the commits with NULs instead of with new newlines.\n\nAlso, when --raw or --numstat has been given, do not munge pathnames and use NULs as\noutput field terminators.\n\nWithout this option, pathnames with \"unusual\" characters are quoted as explained for the\nconfiguration variable core.quotePath (see git-config(1)).\n",
                        "flag": "-z"
                    },
                    {
                        "name": "--name-only",
                        "content": "Show only names of changed files. The file names are often encoded in UTF-8. For more\ninformation see the discussion about encoding in the git-log(1) manual page.\n",
                        "long": "--name-only"
                    },
                    {
                        "name": "--name-status",
                        "content": "Show only names and status of changed files. See the description of the --diff-filter\noption on what the status letters mean. Just like --name-only the file names are often\nencoded in UTF-8.\n\n--submodule[=<format>]\nSpecify how differences in submodules are shown. When specifying --submodule=short the\nshort format is used. This format just shows the names of the commits at the beginning\nand end of the range. When --submodule or --submodule=log is specified, the log format is\nused. This format lists the commits in the range like git-submodule(1) summary does. When\n--submodule=diff is specified, the diff format is used. This format shows an inline diff\nof the changes in the submodule contents between the commit range. Defaults to\ndiff.submodule or the short format if the config option is unset.\n\n--color[=<when>]\nShow colored diff.  --color (i.e. without =<when>) is the same as --color=always.  <when>\ncan be one of always, never, or auto.\n",
                        "long": "--name-status"
                    },
                    {
                        "name": "--no-color",
                        "content": "Turn off colored diff. It is the same as --color=never.\n\n--color-moved[=<mode>]\nMoved lines of code are colored differently. The <mode> defaults to no if the option is\nnot given and to zebra if the option with no mode is given. The mode must be one of:\n\nno\nMoved lines are not highlighted.\n\ndefault\nIs a synonym for zebra. This may change to a more sensible mode in the future.\n\nplain\nAny line that is added in one location and was removed in another location will be\ncolored with color.diff.newMoved. Similarly color.diff.oldMoved will be used for\nremoved lines that are added somewhere else in the diff. This mode picks up any moved\nline, but it is not very useful in a review to determine if a block of code was moved\nwithout permutation.\n\nblocks\nBlocks of moved text of at least 20 alphanumeric characters are detected greedily.\nThe detected blocks are painted using either the color.diff.{old,new}Moved color.\nAdjacent blocks cannot be told apart.\n\nzebra\nBlocks of moved text are detected as in blocks mode. The blocks are painted using\neither the color.diff.{old,new}Moved color or color.diff.{old,new}MovedAlternative.\nThe change between the two colors indicates that a new block was detected.\n\ndimmed-zebra\nSimilar to zebra, but additional dimming of uninteresting parts of moved code is\nperformed. The bordering lines of two adjacent blocks are considered interesting, the\nrest is uninteresting.  dimmedzebra is a deprecated synonym.\n",
                        "long": "--no-color"
                    },
                    {
                        "name": "--no-color-moved",
                        "content": "Turn off move detection. This can be used to override configuration settings. It is the\nsame as --color-moved=no.\n\n--color-moved-ws=<modes>\nThis configures how whitespace is ignored when performing the move detection for\n--color-moved. These modes can be given as a comma separated list:\n\nno\nDo not ignore whitespace when performing move detection.\n\nignore-space-at-eol\nIgnore changes in whitespace at EOL.\n\nignore-space-change\nIgnore changes in amount of whitespace. This ignores whitespace at line end, and\nconsiders all other sequences of one or more whitespace characters to be equivalent.\n\nignore-all-space\nIgnore whitespace when comparing lines. This ignores differences even if one line has\nwhitespace where the other line has none.\n\nallow-indentation-change\nInitially ignore any whitespace in the move detection, then group the moved code\nblocks only into a block if the change in whitespace is the same per line. This is\nincompatible with the other modes.\n",
                        "long": "--no-color-moved"
                    },
                    {
                        "name": "--no-color-moved-ws",
                        "content": "Do not ignore whitespace when performing move detection. This can be used to override\nconfiguration settings. It is the same as --color-moved-ws=no.\n\n--word-diff[=<mode>]\nShow a word diff, using the <mode> to delimit changed words. By default, words are\ndelimited by whitespace; see --word-diff-regex below. The <mode> defaults to plain, and\nmust be one of:\n\ncolor\nHighlight changed words using only colors. Implies --color.\n\nplain\nShow words as [-removed-] and {+added+}. Makes no attempts to escape the delimiters\nif they appear in the input, so the output may be ambiguous.\n\nporcelain\nUse a special line-based format intended for script consumption.\nAdded/removed/unchanged runs are printed in the usual unified diff format, starting\nwith a +/-/` ` character at the beginning of the line and extending to the end of the\nline. Newlines in the input are represented by a tilde ~ on a line of its own.\n\nnone\nDisable word diff again.\n\nNote that despite the name of the first mode, color is used to highlight the changed\nparts in all modes if enabled.\n\n--word-diff-regex=<regex>\nUse <regex> to decide what a word is, instead of considering runs of non-whitespace to be\na word. Also implies --word-diff unless it was already enabled.\n\nEvery non-overlapping match of the <regex> is considered a word. Anything between these\nmatches is considered whitespace and ignored(!) for the purposes of finding differences.\nYou may want to append |[^[:space:]] to your regular expression to make sure that it\nmatches all non-whitespace characters. A match that contains a newline is silently\ntruncated(!) at the newline.\n\nFor example, --word-diff-regex=.  will treat each character as a word and,\ncorrespondingly, show differences character by character.\n\nThe regex can also be set via a diff driver or configuration option, see gitattributes(5)\nor git-config(1). Giving it explicitly overrides any diff driver or configuration\nsetting. Diff drivers override configuration settings.\n\n--color-words[=<regex>]\nEquivalent to --word-diff=color plus (if a regex was specified)\n--word-diff-regex=<regex>.\n",
                        "long": "--no-color-moved-ws"
                    },
                    {
                        "name": "--no-renames",
                        "content": "Turn off rename detection, even when the configuration file gives the default to do so.\n\n--[no-]rename-empty\nWhether to use empty blobs as rename source.\n",
                        "long": "--no-renames"
                    },
                    {
                        "name": "--check",
                        "content": "Warn if changes introduce conflict markers or whitespace errors. What are considered\nwhitespace errors is controlled by core.whitespace configuration. By default, trailing\nwhitespaces (including lines that consist solely of whitespaces) and a space character\nthat is immediately followed by a tab character inside the initial indent of the line are\nconsidered whitespace errors. Exits with non-zero status if problems are found. Not\ncompatible with --exit-code.\n\n--ws-error-highlight=<kind>\nHighlight whitespace errors in the context, old or new lines of the diff. Multiple values\nare separated by comma, none resets previous values, default reset the list to new and\nall is a shorthand for old,new,context. When this option is not given, and the\nconfiguration variable diff.wsErrorHighlight is not set, only whitespace errors in new\nlines are highlighted. The whitespace errors are colored with color.diff.whitespace.\n",
                        "long": "--check"
                    },
                    {
                        "name": "--full-index",
                        "content": "Instead of the first handful of characters, show the full pre- and post-image blob object\nnames on the \"index\" line when generating patch format output.\n",
                        "long": "--full-index"
                    },
                    {
                        "name": "--binary",
                        "content": "In addition to --full-index, output a binary diff that can be applied with git-apply.\nImplies --patch.\n\n--abbrev[=<n>]\nInstead of showing the full 40-byte hexadecimal object name in diff-raw format output and\ndiff-tree header lines, show the shortest prefix that is at least <n> hexdigits long that\nuniquely refers the object. In diff-patch output format, --full-index takes higher\nprecedence, i.e. if --full-index is specified, full blob names will be shown regardless\nof --abbrev. Non default number of digits can be specified with --abbrev=<n>.\n\n-B[<n>][/<m>], --break-rewrites[=[<n>][/<m>]]\nBreak complete rewrite changes into pairs of delete and create. This serves two purposes:\n\nIt affects the way a change that amounts to a total rewrite of a file not as a series of\ndeletion and insertion mixed together with a very few lines that happen to match\ntextually as the context, but as a single deletion of everything old followed by a single\ninsertion of everything new, and the number m controls this aspect of the -B option\n(defaults to 60%).  -B/70% specifies that less than 30% of the original should remain in\nthe result for Git to consider it a total rewrite (i.e. otherwise the resulting patch\nwill be a series of deletion and insertion mixed together with context lines).\n\nWhen used with -M, a totally-rewritten file is also considered as the source of a rename\n(usually -M only considers a file that disappeared as the source of a rename), and the\nnumber n controls this aspect of the -B option (defaults to 50%).  -B20% specifies that a\nchange with addition and deletion compared to 20% or more of the file’s size are eligible\nfor being picked up as a possible source of a rename to another file.\n\n-M[<n>], --find-renames[=<n>]\nIf generating diffs, detect and report renames for each commit. For following files\nacross renames while traversing history, see --follow. If n is specified, it is a\nthreshold on the similarity index (i.e. amount of addition/deletions compared to the\nfile’s size). For example, -M90% means Git should consider a delete/add pair to be a\nrename if more than 90% of the file hasn’t changed. Without a % sign, the number is to be\nread as a fraction, with a decimal point before it. I.e., -M5 becomes 0.5, and is thus\nthe same as -M50%. Similarly, -M05 is the same as -M5%. To limit detection to exact\nrenames, use -M100%. The default similarity index is 50%.\n\n-C[<n>], --find-copies[=<n>]\nDetect copies as well as renames. See also --find-copies-harder. If n is specified, it\nhas the same meaning as for -M<n>.\n",
                        "long": "--binary"
                    },
                    {
                        "name": "--find-copies-harder",
                        "content": "For performance reasons, by default, -C option finds copies only if the original file of\nthe copy was modified in the same changeset. This flag makes the command inspect\nunmodified files as candidates for the source of copy. This is a very expensive operation\nfor large projects, so use it with caution. Giving more than one -C option has the same\neffect.\n",
                        "long": "--find-copies-harder"
                    },
                    {
                        "name": "-D, --irreversible-delete",
                        "content": "Omit the preimage for deletes, i.e. print only the header but not the diff between the\npreimage and /dev/null. The resulting patch is not meant to be applied with patch or git\napply; this is solely for people who want to just concentrate on reviewing the text after\nthe change. In addition, the output obviously lacks enough information to apply such a\npatch in reverse, even manually, hence the name of the option.\n\nWhen used together with -B, omit also the preimage in the deletion part of a\ndelete/create pair.\n",
                        "flag": "-D",
                        "long": "--irreversible-delete"
                    },
                    {
                        "name": "-l<num>",
                        "content": "The -M and -C options involve some preliminary steps that can detect subsets of\nrenames/copies cheaply, followed by an exhaustive fallback portion that compares all\nremaining unpaired destinations to all relevant sources. (For renames, only remaining\nunpaired sources are relevant; for copies, all original sources are relevant.) For N\nsources and destinations, this exhaustive check is O(N^2). This option prevents the\nexhaustive portion of rename/copy detection from running if the number of\nsource/destination files involved exceeds the specified number. Defaults to\ndiff.renameLimit. Note that a value of 0 is treated as unlimited.\n\n--diff-filter=[(A|C|D|M|R|T|U|X|B)...[*]]\nSelect only files that are Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R),\nhave their type (i.e. regular file, symlink, submodule, ...) changed (T), are Unmerged\n(U), are Unknown (X), or have had their pairing Broken (B). Any combination of the filter\ncharacters (including none) can be used. When * (All-or-none) is added to the\ncombination, all paths are selected if there is any file that matches other criteria in\nthe comparison; if there is no file that matches other criteria, nothing is selected.\n\nAlso, these upper-case letters can be downcased to exclude. E.g.  --diff-filter=ad\nexcludes added and deleted paths.\n\nNote that not all diffs can feature all types. For instance, diffs from the index to the\nworking tree can never have Added entries (because the set of paths included in the diff\nis limited by what is in the index). Similarly, copied and renamed entries cannot appear\nif detection for those types is disabled.\n"
                    },
                    {
                        "name": "-S<string>",
                        "content": "Look for differences that change the number of occurrences of the specified string (i.e.\naddition/deletion) in a file. Intended for the scripter’s use.\n\nIt is useful when you’re looking for an exact block of code (like a struct), and want to\nknow the history of that block since it first came into being: use the feature\niteratively to feed the interesting block in the preimage back into -S, and keep going\nuntil you get the very first version of the block.\n\nBinary files are searched as well.\n"
                    },
                    {
                        "name": "-G<regex>",
                        "content": "Look for differences whose patch text contains added/removed lines that match <regex>.\n\nTo illustrate the difference between -S<regex> --pickaxe-regex and -G<regex>, consider a\ncommit with the following diff in the same file:\n\n+    return frotz(nitfol, two->ptr, 1, 0);\n...\n-    hit = frotz(nitfol, mf2.ptr, 1, 0);\n\nWhile git log -G\"frotz\\(nitfol\" will show this commit, git log -S\"frotz\\(nitfol\"\n--pickaxe-regex will not (because the number of occurrences of that string did not\nchange).\n\nUnless --text is supplied patches of binary files without a textconv filter will be\nignored.\n\nSee the pickaxe entry in gitdiffcore(7) for more information.\n\n--find-object=<object-id>\nLook for differences that change the number of occurrences of the specified object.\nSimilar to -S, just the argument is different in that it doesn’t search for a specific\nstring but for a specific object id.\n\nThe object can be a blob or a submodule commit. It implies the -t option in git-log to\nalso find trees.\n"
                    },
                    {
                        "name": "--pickaxe-all",
                        "content": "When -S or -G finds a change, show all the changes in that changeset, not just the files\nthat contain the change in <string>.\n",
                        "long": "--pickaxe-all"
                    },
                    {
                        "name": "--pickaxe-regex",
                        "content": "Treat the <string> given to -S as an extended POSIX regular expression to match.\n",
                        "long": "--pickaxe-regex"
                    },
                    {
                        "name": "-O<orderfile>",
                        "content": "Control the order in which files appear in the output. This overrides the diff.orderFile\nconfiguration variable (see git-config(1)). To cancel diff.orderFile, use -O/dev/null.\n\nThe output order is determined by the order of glob patterns in <orderfile>. All files\nwith pathnames that match the first pattern are output first, all files with pathnames\nthat match the second pattern (but not the first) are output next, and so on. All files\nwith pathnames that do not match any pattern are output last, as if there was an implicit\nmatch-all pattern at the end of the file. If multiple pathnames have the same rank (they\nmatch the same pattern but no earlier patterns), their output order relative to each\nother is the normal order.\n\n<orderfile> is parsed as follows:\n\n•   Blank lines are ignored, so they can be used as separators for readability.\n\n•   Lines starting with a hash (\"#\") are ignored, so they can be used for comments. Add a\nbackslash (\"\\\") to the beginning of the pattern if it starts with a hash.\n\n•   Each other line contains a single pattern.\n\nPatterns have the same syntax and semantics as patterns used for fnmatch(3) without the\nFNMPATHNAME flag, except a pathname also matches a pattern if removing any number of the\nfinal pathname components matches the pattern. For example, the pattern \"foo*bar\" matches\n\"fooasdfbar\" and \"foo/bar/baz/asdf\" but not \"foobarx\".\n\n--skip-to=<file>, --rotate-to=<file>\nDiscard the files before the named <file> from the output (i.e.  skip to), or move them\nto the end of the output (i.e.  rotate to). These were invented primarily for use of the\ngit difftool command, and may not be very useful otherwise.\n"
                    },
                    {
                        "name": "-R",
                        "content": "Swap two inputs; that is, show differences from index or on-disk file to tree contents.\n\n--relative[=<path>], --no-relative\nWhen run from a subdirectory of the project, it can be told to exclude changes outside\nthe directory and show pathnames relative to it with this option. When you are not in a\nsubdirectory (e.g. in a bare repository), you can name which subdirectory to make the\noutput relative to by giving a <path> as an argument.  --no-relative can be used to\ncountermand both diff.relative config option and previous --relative.\n",
                        "flag": "-R"
                    },
                    {
                        "name": "-a, --text",
                        "content": "Treat all files as text.\n",
                        "flag": "-a",
                        "long": "--text"
                    },
                    {
                        "name": "--ignore-cr-at-eol",
                        "content": "Ignore carriage-return at the end of line when doing a comparison.\n",
                        "long": "--ignore-cr-at-eol"
                    },
                    {
                        "name": "--ignore-space-at-eol",
                        "content": "Ignore changes in whitespace at EOL.\n",
                        "long": "--ignore-space-at-eol"
                    },
                    {
                        "name": "-b, --ignore-space-change",
                        "content": "Ignore changes in amount of whitespace. This ignores whitespace at line end, and\nconsiders all other sequences of one or more whitespace characters to be equivalent.\n",
                        "flag": "-b",
                        "long": "--ignore-space-change"
                    },
                    {
                        "name": "-w, --ignore-all-space",
                        "content": "Ignore whitespace when comparing lines. This ignores differences even if one line has\nwhitespace where the other line has none.\n",
                        "flag": "-w",
                        "long": "--ignore-all-space"
                    },
                    {
                        "name": "--ignore-blank-lines",
                        "content": "Ignore changes whose lines are all blank.\n\n-I<regex>, --ignore-matching-lines=<regex>\nIgnore changes whose all lines match <regex>. This option may be specified more than\nonce.\n\n--inter-hunk-context=<lines>\nShow the context between diff hunks, up to the specified number of lines, thereby fusing\nhunks that are close to each other. Defaults to diff.interHunkContext or 0 if the config\noption is unset.\n",
                        "long": "--ignore-blank-lines"
                    },
                    {
                        "name": "-W, --function-context",
                        "content": "Show whole function as context lines for each change. The function names are determined\nin the same way as git diff works out patch hunk headers (see Defining a custom\nhunk-header in gitattributes(5)).\n",
                        "flag": "-W",
                        "long": "--function-context"
                    },
                    {
                        "name": "--ext-diff",
                        "content": "Allow an external diff helper to be executed. If you set an external diff driver with\ngitattributes(5), you need to use this option with git-log(1) and friends.\n",
                        "long": "--ext-diff"
                    },
                    {
                        "name": "--no-ext-diff",
                        "content": "Disallow external diff drivers.\n",
                        "long": "--no-ext-diff"
                    },
                    {
                        "name": "--textconv, --no-textconv",
                        "content": "Allow (or disallow) external text conversion filters to be run when comparing binary\nfiles. See gitattributes(5) for details. Because textconv filters are typically a one-way\nconversion, the resulting diff is suitable for human consumption, but cannot be applied.\nFor this reason, textconv filters are enabled by default only for git-diff(1) and git-\nlog(1), but not for git-format-patch(1) or diff plumbing commands.\n\n--ignore-submodules[=<when>]\nIgnore changes to submodules in the diff generation. <when> can be either \"none\",\n\"untracked\", \"dirty\" or \"all\", which is the default. Using \"none\" will consider the\nsubmodule modified when it either contains untracked or modified files or its HEAD\ndiffers from the commit recorded in the superproject and can be used to override any\nsettings of the ignore option in git-config(1) or gitmodules(5). When \"untracked\" is used\nsubmodules are not considered dirty when they only contain untracked content (but they\nare still scanned for modified content). Using \"dirty\" ignores all changes to the work\ntree of submodules, only changes to the commits stored in the superproject are shown\n(this was the behavior until 1.7.0). Using \"all\" hides all changes to submodules.\n\n--src-prefix=<prefix>\nShow the given source prefix instead of \"a/\".\n\n--dst-prefix=<prefix>\nShow the given destination prefix instead of \"b/\".\n",
                        "long": "--no-textconv"
                    },
                    {
                        "name": "--no-prefix",
                        "content": "Do not show any source or destination prefix.\n\n--line-prefix=<prefix>\nPrepend an additional prefix to every line of output.\n",
                        "long": "--no-prefix"
                    },
                    {
                        "name": "--ita-invisible-in-index",
                        "content": "By default entries added by \"git add -N\" appear as an existing empty file in \"git diff\"\nand a new file in \"git diff --cached\". This option makes the entry appear as a new file\nin \"git diff\" and non-existent in \"git diff --cached\". This option could be reverted with\n--ita-visible-in-index. Both options are experimental and could be removed in future.\n\nFor more detailed explanation on these common options, see also gitdiffcore(7).\n",
                        "long": "--ita-invisible-in-index"
                    }
                ]
            },
            "GENERATING PATCH TEXT WITH -P": {
                "content": "Running git-diff(1), git-log(1), git-show(1), git-diff-index(1), git-diff-tree(1), or git-\ndiff-files(1) with the -p option produces patch text. You can customize the creation of patch\ntext via the GITEXTERNALDIFF and the GITDIFFOPTS environment variables (see git(1)), and\nthe diff attribute (see gitattributes(5)).\n\nWhat the -p option produces is slightly different from the traditional diff format:\n\n1. It is preceded with a \"git diff\" header that looks like this:\n\ndiff --git a/file1 b/file2\n\nThe a/ and b/ filenames are the same unless rename/copy is involved. Especially, even for\na creation or a deletion, /dev/null is not used in place of the a/ or b/ filenames.\n\nWhen rename/copy is involved, file1 and file2 show the name of the source file of the\nrename/copy and the name of the file that rename/copy produces, respectively.\n\n2. It is followed by one or more extended header lines:\n\nold mode <mode>\nnew mode <mode>\ndeleted file mode <mode>\nnew file mode <mode>\ncopy from <path>\ncopy to <path>\nrename from <path>\nrename to <path>\nsimilarity index <number>\ndissimilarity index <number>\nindex <hash>..<hash> <mode>\n\nFile modes are printed as 6-digit octal numbers including the file type and file\npermission bits.\n\nPath names in extended headers do not include the a/ and b/ prefixes.\n\nThe similarity index is the percentage of unchanged lines, and the dissimilarity index is\nthe percentage of changed lines. It is a rounded down integer, followed by a percent\nsign. The similarity index value of 100% is thus reserved for two equal files, while 100%\ndissimilarity means that no line from the old file made it into the new one.\n\nThe index line includes the blob object names before and after the change. The <mode> is\nincluded if the file mode does not change; otherwise, separate lines indicate the old and\nthe new mode.\n\n3. Pathnames with \"unusual\" characters are quoted as explained for the configuration\nvariable core.quotePath (see git-config(1)).\n\n4. All the file1 files in the output refer to files before the commit, and all the file2\nfiles refer to files after the commit. It is incorrect to apply each change to each file\nsequentially. For example, this patch will swap a and b:\n\ndiff --git a/a b/b\nrename from a\nrename to b\ndiff --git a/b b/a\nrename from b\nrename to a\n\n5. Hunk headers mention the name of the function to which the hunk applies. See \"Defining a\ncustom hunk-header\" in gitattributes(5) for details of how to tailor to this to specific\nlanguages.\n",
                "subsections": []
            },
            "COMBINED DIFF FORMAT": {
                "content": "Any diff-generating command can take the -c or --cc option to produce a combined diff when\nshowing a merge. This is the default format when showing merges with git-diff(1) or git-\nshow(1). Note also that you can give suitable --diff-merges option to any of these commands\nto force generation of diffs in specific format.\n\nA \"combined diff\" format looks like this:\n\ndiff --combined describe.c\nindex fabadb8,cc95eb0..4866510\n--- a/describe.c\n+++ b/describe.c\n@@@ -98,20 -98,12 +98,20 @@@\nreturn (adate > bdate) ? -1 : (adate == bdate) ? 0 : 1;\n}\n\n- static void describe(char *arg)\n-static void describe(struct commit *cmit, int lastone)\n++static void describe(char *arg, int lastone)\n{\n+      unsigned char sha1[20];\n+      struct commit *cmit;\nstruct commitlist *list;\nstatic int initialized = 0;\nstruct commitname *n;\n\n+      if (getsha1(arg, sha1) < 0)\n+              usage(describeusage);\n+      cmit = lookupcommitreference(sha1);\n+      if (!cmit)\n+              usage(describeusage);\n+\nif (!initialized) {\ninitialized = 1;\nforeachref(getname);\n\n\n\n1. It is preceded with a \"git diff\" header, that looks like this (when the -c option is\nused):\n\ndiff --combined file\n\nor like this (when the --cc option is used):\n\ndiff --cc file\n\n2. It is followed by one or more extended header lines (this example shows a merge with two\nparents):\n\nindex <hash>,<hash>..<hash>\nmode <mode>,<mode>..<mode>\nnew file mode <mode>\ndeleted file mode <mode>,<mode>\n\nThe mode <mode>,<mode>..<mode> line appears only if at least one of the <mode> is\ndifferent from the rest. Extended headers with information about detected contents\nmovement (renames and copying detection) are designed to work with diff of two <tree-ish>\nand are not used by combined diff format.\n\n3. It is followed by two-line from-file/to-file header\n\n--- a/file\n+++ b/file\n\nSimilar to two-line header for traditional unified diff format, /dev/null is used to\nsignal created or deleted files.\n\nHowever, if the --combined-all-paths option is provided, instead of a two-line\nfrom-file/to-file you get a N+1 line from-file/to-file header, where N is the number of\nparents in the merge commit\n\n--- a/file\n--- a/file\n--- a/file\n+++ b/file\n\nThis extended format can be useful if rename or copy detection is active, to allow you to\nsee the original name of the file in different parents.\n\n4. Chunk header format is modified to prevent people from accidentally feeding it to patch\n-p1. Combined diff format was created for review of merge commit changes, and was not\nmeant to be applied. The change is similar to the change in the extended index header:\n\n@@@ <from-file-range> <from-file-range> <to-file-range> @@@\n\nThere are (number of parents + 1) @ characters in the chunk header for combined diff\nformat.\n\nUnlike the traditional unified diff format, which shows two files A and B with a single\ncolumn that has - (minus — appears in A but removed in B), + (plus — missing in A but added\nto B), or \" \" (space — unchanged) prefix, this format compares two or more files file1,\nfile2,... with one file X, and shows how X differs from each of fileN. One column for each of\nfileN is prepended to the output line to note how X’s line is different from it.\n\nA - character in the column N means that the line appears in fileN but it does not appear in\nthe result. A + character in the column N means that the line appears in the result, and\nfileN does not have that line (in other words, the line was added, from the point of view of\nthat parent).\n\nIn the above example output, the function signature was changed from both files (hence two -\nremovals from both file1 and file2, plus ++ to mean one line that was added does not appear\nin either file1 or file2). Also eight other lines are the same from file1 but do not appear\nin file2 (hence prefixed with +).\n\nWhen shown by git diff-tree -c, it compares the parents of a merge commit with the merge\nresult (i.e. file1..fileN are the parents). When shown by git diff-files -c, it compares the\ntwo unresolved merge parents with the working tree file (i.e. file1 is stage 2 aka \"our\nversion\", file2 is stage 3 aka \"their version\").\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "",
                "subsections": [
                    {
                        "name": "git show v1.0.0",
                        "content": "Shows the tag v1.0.0, along with the object the tags points at.\n"
                    },
                    {
                        "name": "git show v1.0.0^{tree}",
                        "content": "Shows the tree pointed to by the tag v1.0.0.\n"
                    },
                    {
                        "name": "git show -s --format=%s v1.0.0^{commit}",
                        "content": "Shows the subject of the commit pointed to by the tag v1.0.0.\n"
                    },
                    {
                        "name": "git show next~10:Documentation/README",
                        "content": "Shows the contents of the file Documentation/README as they were current in the 10th last\ncommit of the branch next.\n"
                    },
                    {
                        "name": "git show master:Makefile master:t/Makefile",
                        "content": "Concatenates the contents of said Makefiles in the head of the branch master.\n"
                    }
                ]
            },
            "DISCUSSION": {
                "content": "Git is to some extent character encoding agnostic.\n\n•   The contents of the blob objects are uninterpreted sequences of bytes. There is no\nencoding translation at the core level.\n\n•   Path names are encoded in UTF-8 normalization form C. This applies to tree objects, the\nindex file, ref names, as well as path names in command line arguments, environment\nvariables and config files (.git/config (see git-config(1)), gitignore(5),\ngitattributes(5) and gitmodules(5)).\n\nNote that Git at the core level treats path names simply as sequences of non-NUL bytes,\nthere are no path name encoding conversions (except on Mac and Windows). Therefore, using\nnon-ASCII path names will mostly work even on platforms and file systems that use legacy\nextended ASCII encodings. However, repositories created on such systems will not work\nproperly on UTF-8-based systems (e.g. Linux, Mac, Windows) and vice versa. Additionally,\nmany Git-based tools simply assume path names to be UTF-8 and will fail to display other\nencodings correctly.\n\n•   Commit log messages are typically encoded in UTF-8, but other extended ASCII encodings\nare also supported. This includes ISO-8859-x, CP125x and many others, but not UTF-16/32,\nEBCDIC and CJK multi-byte encodings (GBK, Shift-JIS, Big5, EUC-x, CP9xx etc.).\n\nAlthough we encourage that the commit log messages are encoded in UTF-8, both the core and\nGit Porcelain are designed not to force UTF-8 on projects. If all participants of a\nparticular project find it more convenient to use legacy encodings, Git does not forbid it.\nHowever, there are a few things to keep in mind.\n\n1. git commit and git commit-tree issues a warning if the commit log message given to it\ndoes not look like a valid UTF-8 string, unless you explicitly say your project uses a\nlegacy encoding. The way to say this is to have i18n.commitEncoding in .git/config file,\nlike this:\n\n[i18n]\ncommitEncoding = ISO-8859-1\n\nCommit objects created with the above setting record the value of i18n.commitEncoding in\nits encoding header. This is to help other people who look at them later. Lack of this\nheader implies that the commit log message is encoded in UTF-8.\n\n2. git log, git show, git blame and friends look at the encoding header of a commit object,\nand try to re-code the log message into UTF-8 unless otherwise specified. You can specify\nthe desired output encoding with i18n.logOutputEncoding in .git/config file, like this:\n\n[i18n]\nlogOutputEncoding = ISO-8859-1\n\nIf you do not have this configuration variable, the value of i18n.commitEncoding is used\ninstead.\n\nNote that we deliberately chose not to re-code the commit log message when a commit is made\nto force UTF-8 at the commit object level, because re-coding to UTF-8 is not necessarily a\nreversible operation.\n",
                "subsections": []
            },
            "GIT": {
                "content": "Part of the git(1) suite\n\n\n\nGit 2.34.1                                   02/26/2026                                  GIT-SHOW(1)",
                "subsections": []
            }
        }
    }
}