{
    "mode": "info",
    "parameter": "git-show",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/git-show/json",
    "generated": "2026-07-09T09:19:41Z",
    "synopsis": "git show [<options>] [<object>...]",
    "sections": {
        "NAME": {
            "content": "git-show - Show various types of objects\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "git show [<options>] [<object>...]\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\nthe merge commit in a special 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\n--name-only).\n\nFor plain blobs, it shows the plain contents.\n\nThe command takes options applicable to the git diff-tree command to\ncontrol how the changes the 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\ncomplete list of ways to spell object names, see \"SPECIFYING\nREVISIONS\" section in gitrevisions(7).\n\n--pretty[=<format>], --format=<format>\nPretty-print the contents of the commit logs in a given format,\nwhere <format> can be one of oneline, short, medium, full, fuller,\nreference, email, raw, format:<string> and tformat:<string>. When\n<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\neach format. When =<format> part is omitted, it defaults to medium.\n\nNote: you can specify the default pretty format in the repository\nconfiguration (see git-config(1)).\n",
            "subsections": [
                {
                    "name": "--abbrev-commit",
                    "content": "Instead of showing the full 40-byte hexadecimal commit object name,\nshow a prefix that names the object uniquely. \"--abbrev=<n>\" (which\nalso modifies diff output, if it is displayed) option can be used\nto specify the minimum length of the prefix.\n\nThis should make \"--pretty=oneline\" a whole lot more readable for\npeople using 80-column terminals.\n",
                    "long": "--abbrev-commit"
                },
                {
                    "name": "--no-abbrev-commit",
                    "content": "Show the full 40-byte hexadecimal commit object name. This negates\n--abbrev-commit, either explicit or implied by other options such\nas \"--oneline\". It also overrides the log.abbrevCommit variable.\n",
                    "long": "--no-abbrev-commit"
                },
                {
                    "name": "--oneline",
                    "content": "This is a shorthand for \"--pretty=oneline --abbrev-commit\" used\ntogether.\n\n--encoding=<encoding>\nCommit objects record the character encoding used for the log\nmessage in their encoding header; this option can be used to tell\nthe command to re-code the commit log message in the encoding\npreferred by the user. For non plumbing commands this defaults to\nUTF-8. Note that if an object claims to be encoded in X and we are\noutputting in X, we will output the object verbatim; this means\nthat invalid sequences in the original commit may be copied to the\noutput. 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\nfill to the next display column that is multiple of <n>) in the log\nmessage before showing it in the output.  --expand-tabs is a\nshort-hand for --expand-tabs=8, and --no-expand-tabs is a\nshort-hand for --expand-tabs=0, which disables tab expansion.\n\nBy default, tabs are expanded in pretty formats that indent the log\nmessage by 4 spaces (i.e.  medium, which is the default, full, and\nfuller).\n\n--notes[=<ref>]\nShow the notes (see git-notes(1)) that annotate the commit, when\nshowing the commit log message. This is the default for git log,\ngit show and git whatchanged commands when there is no --pretty,\n--format, or --oneline option given on the command line.\n\nBy default, the notes shown are from the notes refs listed in the\ncore.notesRef and notes.displayRef variables (or corresponding\nenvironment overrides). See git-config(1) for more details.\n\nWith an optional <ref> argument, use the ref to find the notes to\ndisplay. The ref can specify the full refname when it begins with\nrefs/notes/; when it begins with notes/, refs/ and otherwise\nrefs/notes/ is prefixed to form a full name of the ref.\n\nMultiple --notes options can be combined to control which notes are\nbeing displayed. Examples: \"--notes=foo\" will show only notes from\n\"refs/notes/foo\"; \"--notes=foo --notes\" will show both notes from\n\"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\nresetting the list of notes refs from which notes are shown.\nOptions are parsed in the order given on the command line, so e.g.\n\"--notes --notes=foo --no-notes --notes=bar\" will only show notes\nfrom \"refs/notes/bar\".\n\n--show-notes[=<ref>], --[no-]standard-notes\nThese options are deprecated. Use the above --notes/--no-notes\noptions instead.\n",
                    "long": "--no-notes"
                },
                {
                    "name": "--show-signature",
                    "content": "Check the validity of a signed commit object by passing the\nsignature to gpg --verify and show the output.\n",
                    "long": "--show-signature"
                }
            ]
        },
        "PRETTY FORMATS": {
            "content": "If the commit is a merge, and if the pretty-format is not oneline,\nemail or raw, an additional line is inserted before the Author: line.\nThis line begins with \"Merge: \" and the hashes of ancestral commits are\nprinted, separated by spaces. Note that the listed commits may not\nnecessarily be the list of the direct parent commits if you have\nlimited your view of history: for example, if you are only interested\nin changes related to a certain directory or file.\n\nThere are several built-in formats, and you can define additional\nformats by setting a pretty.<name> config option to either another\nformat name, or a format: string, as described below (see git-\nconfig(1)). Here are the details of the built-in formats:\n\no   oneline\n\n<hash> <title line>\n\nThis is designed to be as compact as possible.\n\no   short\n\ncommit <hash>\nAuthor: <author>\n\n<title line>\n\no   medium\n\ncommit <hash>\nAuthor: <author>\nDate:   <author date>\n\n<title line>\n\n<full commit message>\n\no   full\n\ncommit <hash>\nAuthor: <author>\nCommit: <committer>\n\n<title line>\n\n<full commit message>\n\no   fuller\n\ncommit <hash>\nAuthor:     <author>\nAuthorDate: <author date>\nCommit:     <committer>\nCommitDate: <committer date>\n\n<title line>\n\n<full commit message>\n\no   reference\n\n<abbrev hash> (<title line>, <short author date>)\n\nThis format is used to refer to another commit in a commit message\nand is the same as --pretty='format:%C(auto)%h (%s, %ad)'. By\ndefault, the date is formatted with --date=short unless another\n--date option is explicitly specified. As with any format: with\nformat placeholders, its output is not affected by other options\nlike --decorate and --walk-reflogs.\n\no   email\n\nFrom <hash> <date>\nFrom: <author>\nDate: <author date>\nSubject: [PATCH] <title line>\n\n<full commit message>\n\no   mboxrd\n\nLike email, but lines in the commit message starting with \"From \"\n(preceded by zero or more \">\") are quoted with \">\" so they aren't\nconfused as starting a new commit.\n\no   raw\n\nThe raw format shows the entire commit exactly as stored in the\ncommit object. Notably, the hashes are displayed in full,\nregardless of whether --abbrev or --no-abbrev are used, and parents\ninformation show the true parent commits, without taking grafts or\nhistory simplification into account. Note that this format affects\nthe way commits are displayed, but not the way the diff is shown\ne.g. with git log --raw. To get full object names in a raw diff\nformat, use --no-abbrev.\n\no   format:<string>\n\nThe format:<string> format allows you to specify which information\nyou want to show. It works a little bit like printf format, with\nthe notable exception that you get a newline with %n instead of \\n.\n\nE.g, format:\"The author of %h was %an, %ar%nThe title was >>%s<<%n\"\nwould show something like 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\no   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\no   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\n\"CONFIGURATION FILE\" section of git-config(1). By default,\ncolors are shown only when enabled for log output (by\ncolor.diff, color.ui, or --color, and respecting the auto\nsettings of the former if we are going to a terminal).\n%C(auto,...)  is accepted as a historical synonym for the\ndefault (e.g., %C(auto,red)). Specifying %C(always,...)\nwill show the colors even when color is not otherwise\nenabled (though consider just using --color=always to\nenable color for the whole output, including this format\nand anything else git might color).  auto alone (i.e.\n%C(auto)) will turn on auto coloring on the next\nplaceholders until the color is switched again.\n\n%m\nleft (<), right (>) or boundary (-) mark\n\n%w([<w>[,<i1>[,<i2>]]])\nswitch line wrapping, like the -w option of git-\nshortlog(1).\n\n%<(<N>[,trunc|ltrunc|mtrunc])\nmake the next placeholder take at least N columns, padding\nspaces on the right if necessary. Optionally truncate at\nthe beginning (ltrunc), the middle (mtrunc) or the end\n(trunc) if the output is longer than N columns. Note that\ntruncating only works correctly with N >= 2.\n\n%<|(<N>)\nmake the next placeholder take at least until Nth columns,\npadding spaces on the right if necessary\n\n%>(<N>), %>|(<N>)\nsimilar to %<(<N>), %<|(<N>) respectively, but padding\nspaces on the left\n\n%>>(<N>), %>>|(<N>)\nsimilar to %>(<N>), %>|(<N>) respectively, except that if\nthe next placeholder takes more spaces than given and there\nare spaces on its left, use those spaces\n\n%><(<N>), %><|(<N>)\nsimilar to %<(<N>), %<|(<N>) respectively, but padding both\nsides (i.e. the text is centered)\n\no   Placeholders that expand to information extracted from the\ncommit:\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\ngit-blame(1))\n\n%ae\nauthor email\n\n%aE\nauthor email (respecting .mailmap, see git-shortlog(1) or\ngit-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-\nshortlog(1) or git-blame(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\ngit-rev-list(1))\n\n%cn\ncommitter name\n\n%cN\ncommitter name (respecting .mailmap, see git-shortlog(1) or\ngit-blame(1))\n\n%ce\ncommitter email\n\n%cE\ncommitter email (respecting .mailmap, see git-shortlog(1)\nor 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\ngit-shortlog(1) or git-blame(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\nof 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\nundescribable commits. The describe string may be followed\nby a colon and zero or more comma-separated options.\nDescriptions can be inconsistent when tags are added or\nremoved at the same time.\n\no   match=<pattern>: Only consider tags matching the given\nglob(7) pattern, excluding the \"refs/tags/\" prefix.\n\no   exclude=<pattern>: Do not consider tags matching the\ngiven glob(7) pattern, excluding the \"refs/tags/\"\nprefix.\n\n%S\nref name given on the command line by which the commit was\nreached (like git log --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\nsignature, \"U\" for a good signature with unknown validity,\n\"X\" for a good signature that has expired, \"Y\" for a good\nsignature made by an expired key, \"R\" for a good signature\nmade by a revoked key, \"E\" if the signature cannot be\nchecked (e.g. missing key) and \"N\" for 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\ncommit\n\n%GP\nshow the fingerprint of the primary key whose subkey was\nused to sign a signed commit\n\n%GT\nshow the trust level for the key used to sign a signed\ncommit\n\n%gD\nreflog selector, e.g., refs/stash@{1} or refs/stash@{2\nminutes ago}; the format follows the rules described for\nthe -g option. The portion before the @ is the refname as\ngiven on the command line (so git log -g refs/heads/master\nwould yield refs/heads/master@{0}).\n\n%gd\nshortened reflog selector; same as %gD, but the refname\nportion is shortened for human readability (so\nrefs/heads/master becomes just master).\n\n%gn\nreflog identity name\n\n%gN\nreflog identity name (respecting .mailmap, see git-\nshortlog(1) or git-blame(1))\n\n%ge\nreflog identity email\n\n%gE\nreflog identity email (respecting .mailmap, see git-\nshortlog(1) or git-blame(1))\n\n%gs\nreflog subject\n\n%(trailers[:options])\ndisplay the trailers of the body as interpreted by git-\ninterpret-trailers(1). The trailers string may be followed\nby a colon and zero or more comma-separated options. If any\noption is provided multiple times the last occurrence wins.\n\nThe boolean options accept an optional value [=<BOOL>]. The\nvalues true, false, on, off etc. are all accepted. See the\n\"boolean\" sub-section in \"EXAMPLES\" in git-config(1). If a\nboolean option is given with no value, it's enabled.\n\no   key=<K>: only show trailers with specified key.\nMatching is done case-insensitively and trailing colon\nis optional. If option is given multiple times trailer\nlines matching any of the keys are shown. This option\nautomatically enables the only option so that\nnon-trailer lines in the trailer block are hidden. If\nthat is not desired it can be disabled with only=false.\nE.g., %(trailers:key=Reviewed-by) shows trailer lines\nwith key Reviewed-by.\n\no   only[=<BOOL>]: select whether non-trailer lines from\nthe trailer block should be included.\n\no   separator=<SEP>: specify a separator inserted between\ntrailer lines. When this option is not given each\ntrailer line is terminated with a line feed character.\nThe string SEP may contain the literal formatting codes\ndescribed above. To use comma as separator one must use\n%x2C as it would otherwise be parsed as next option.\nE.g., %(trailers:key=Ticket,separator=%x2C ) shows all\ntrailer lines whose key is \"Ticket\" separated by a\ncomma and a space.\n\no   unfold[=<BOOL>]: make it behave as if\ninterpret-trailer's --unfold option was given. E.g.,\n%(trailers:only,unfold=true) unfolds and shows all\ntrailer lines.\n\no   keyonly[=<BOOL>]: only show the key part of the\ntrailer.\n\no   valueonly[=<BOOL>]: only show the value part of the\ntrailer.\n\no   keyvalueseparator=<SEP>: specify a separator inserted\nbetween trailer lines. When this option is not given\neach trailer key-value pair is separated by \": \".\nOtherwise it shares the same semantics as\nseparator=<SEP> above.\n\nNote\nSome placeholders may depend on other options given to the revision\ntraversal engine. For example, the %g* reflog options will insert\nan empty string unless we are traversing reflog entries (e.g., by\ngit log -g). The %d and %D placeholders will use the \"short\"\ndecoration format if --decorate was not already provided on the\ncommand line.\n\nIf you add a + (plus sign) after % of a placeholder, a line-feed is\ninserted immediately before the expansion if and only if the\nplaceholder expands to a non-empty string.\n\nIf you add a - (minus sign) after % of a placeholder, all consecutive\nline-feeds immediately preceding the expansion are deleted if and only\nif the placeholder expands to an empty string.\n\nIf you add a ` ` (space) after % of a placeholder, a space is inserted\nimmediately before the expansion if and only if the placeholder expands\nto a non-empty string.\n\no   tformat:\n\nThe tformat: format works exactly like format:, except that it\nprovides \"terminator\" semantics instead of \"separator\" semantics.\nIn other words, each commit has the message terminator character\n(usually a newline) appended, rather than a separator placed\nbetween entries. This means that the final entry of a single-line\nformat will be properly terminated with a new line, just as the\n\"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\ninterpreted as if it has tformat: in front of it. For example,\nthese two are equivalent:\n\n$ git log -2 --pretty=tformat:%h 4da45bef\n$ git log -2 --pretty=%h 4da45bef\n",
            "subsections": []
        },
        "DIFF FORMATTING": {
            "content": "The options below can be used to change the way git show generates diff\noutput.\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\nthe patch by default, or 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\ndense-combined unless --first-parent is in use, in which case\nfirst-parent is the default.\n\n--diff-merges=(off|none), --no-diff-merges\nDisable output of diffs for merge commits. Useful to override\nimplied value.\n\n--diff-merges=on, --diff-merges=m, -m\nThis option makes diff output for merge commits to be shown in\nthe default format.  -m will produce the output only if -p is\ngiven as well. The default format could be changed using\nlog.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\nto the first parent only.\n\n--diff-merges=separate\nThis makes merge commits show the full diff with respect to\neach of the parents. Separate log entry and diff is generated\nfor each parent.\n\n--diff-merges=combined, --diff-merges=c, -c\nWith this option, diff output for a merge commit shows the\ndifferences from each of the parents to the merge result\nsimultaneously instead of showing pairwise diff between a\nparent and the result one at a time. Furthermore, it lists only\nfiles which were 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\nis further compressed by omitting uninteresting hunks whose\ncontents in the parents have only two variants and the merge\nresult picks one of them without modification.  --cc implies\n-p.\n",
                    "long": "--no-diff-merges"
                },
                {
                    "name": "--combined-all-paths",
                    "content": "This flag causes combined diffs (used for merge commits) to list\nthe name of the file from all parents. It thus only has effect when\n--diff-merges=[dense-]combined is in use, and is likely only useful\nif filename changes are detected (i.e. when either rename or copy\ndetection have been requested).\n\n-U<n>, --unified=<n>\nGenerate diffs with <n> lines of context instead of the usual\nthree. 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\nthe generated patch. Normally they are +, - and ' ' respectively.\n",
                    "long": "--combined-all-paths"
                },
                {
                    "name": "--raw",
                    "content": "For each commit, show a summary of changes using the raw diff\nformat. See the \"RAW OUTPUT FORMAT\" section of git-diff(1). This is\ndifferent from showing the log itself in raw format, which you can\nachieve 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\npatches easier to read. This 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\nproduced.\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\nonce, and starts with this text, this algorithm attempts to prevent\nit from appearing as a deletion or addition in the output. It uses\nthe \"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\ndefault.\n\nminimal\nSpend extra time to make sure the smallest possible diff is\nproduced.\n\npatience\nUse \"patience diff\" algorithm when generating patches.\n\nhistogram\nThis algorithm extends the patience algorithm to \"support\nlow-occurrence common elements\".\n\nFor instance, if you configured the diff.algorithm variable to a\nnon-default value and want to use the default one, then you have to\nuse --diff-algorithm=default option.\n\n--stat[=<width>[,<name-width>[,<count>]]]\nGenerate a diffstat. By default, as much space as necessary will be\nused for the filename part, and the rest for the graph part.\nMaximum width defaults to terminal width, or 80 columns if not\nconnected to a terminal, and can be overridden by <width>. The\nwidth of the filename part can be limited by giving another width\n<name-width> after a comma. The width of the graph part can be\nlimited by using --stat-graph-width=<width> (affects all commands\ngenerating a stat graph) or by setting diff.statGraphWidth=<width>\n(does not affect git format-patch). By giving a third parameter\n<count>, you can limit the output to the first <count> lines,\nfollowed by ...  if there are more.\n\nThese parameters can also be set individually with\n--stat-width=<width>, --stat-name-width=<name-width> and\n--stat-count=<count>.\n",
                    "long": "--histogram"
                },
                {
                    "name": "--compact-summary",
                    "content": "Output a condensed summary of extended header information such as\nfile creations or deletions (\"new\" or \"gone\", optionally \"+l\" if\nit's a symlink) and mode changes (\"+x\" or \"-x\" for adding or\nremoving executable bit respectively) in diffstat. The information\nis put between the filename part and the graph part. Implies\n--stat.\n",
                    "long": "--compact-summary"
                },
                {
                    "name": "--numstat",
                    "content": "Similar to --stat, but shows number of added and deleted lines in\ndecimal notation and pathname without abbreviation, to make it more\nmachine friendly. For binary files, outputs two - instead of saying\n0 0.\n",
                    "long": "--numstat"
                },
                {
                    "name": "--shortstat",
                    "content": "Output only the last line of the --stat format containing total\nnumber of modified files, as well as number of added and deleted\nlines.\n\n-X[<param1,param2,...>], --dirstat[=<param1,param2,...>]\nOutput the distribution of relative amount of changes for each\nsub-directory. The behavior of --dirstat can be customized by\npassing it a comma separated list of parameters. The defaults are\ncontrolled by the diff.dirstat configuration variable (see git-\nconfig(1)). The following parameters are available:\n\nchanges\nCompute the dirstat numbers by counting the lines that have\nbeen removed from the source, or added to the destination. This\nignores the amount of pure code movements within a file. In\nother words, rearranging lines in a file is not counted as much\nas other changes. This is the default behavior when no\nparameter is given.\n\nlines\nCompute the dirstat numbers by doing the regular line-based\ndiff analysis, and summing the removed/added line counts. (For\nbinary files, count 64-byte chunks instead, since binary files\nhave no natural concept of lines). This is a more expensive\n--dirstat behavior than the changes behavior, but it does count\nrearranged lines within a file as much as other changes. The\nresulting output is consistent with what you get from the other\n--*stat options.\n\nfiles\nCompute the dirstat numbers by counting the number of files\nchanged. Each changed file counts equally in the dirstat\nanalysis. This is the computationally cheapest --dirstat\nbehavior, since it does not have to look at the file contents\nat all.\n\ncumulative\nCount changes in a child directory for the parent directory as\nwell. Note that when using cumulative, the sum of the\npercentages reported may exceed 100%. The default\n(non-cumulative) behavior can be specified with the\nnoncumulative parameter.\n\n<limit>\nAn integer parameter specifies a cut-off percent (3% by\ndefault). Directories contributing less than this percentage of\nthe changes are not shown in the output.\n\nExample: The following will count changed files, while ignoring\ndirectories with less than 10% of the total amount of changed\nfiles, and accumulating child directory counts in the parent\ndirectories: --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\ncreations, renames and mode 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\npathnames and use NULs as output field terminators.\n\nWithout this option, pathnames with \"unusual\" characters are quoted\nas explained for the configuration variable core.quotePath (see\ngit-config(1)).\n",
                    "flag": "-z"
                },
                {
                    "name": "--name-only",
                    "content": "Show only names of changed files. The file names are often encoded\nin UTF-8. For more information see the discussion about encoding in\nthe 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\nthe --diff-filter option on what the status letters mean. Just like\n--name-only the file names are often encoded in UTF-8.\n\n--submodule[=<format>]\nSpecify how differences in submodules are shown. When specifying\n--submodule=short the short format is used. This format just shows\nthe names of the commits at the beginning and end of the range.\nWhen --submodule or --submodule=log is specified, the log format is\nused. This format lists the commits in the range like git-\nsubmodule(1) summary does. When --submodule=diff is specified, the\ndiff format is used. This format shows an inline diff of the\nchanges in the submodule contents between the commit range.\nDefaults to diff.submodule or the short format if the config option\nis unset.\n\n--color[=<when>]\nShow colored diff.  --color (i.e. without =<when>) is the same as\n--color=always.  <when> can 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\nno if the option is not given and to zebra if the option with no\nmode 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\nin the future.\n\nplain\nAny line that is added in one location and was removed in\nanother location will be colored with color.diff.newMoved.\nSimilarly color.diff.oldMoved will be used for removed lines\nthat are added somewhere else in the diff. This mode picks up\nany moved line, but it is not very useful in a review to\ndetermine if a block of code was moved without permutation.\n\nblocks\nBlocks of moved text of at least 20 alphanumeric characters are\ndetected greedily. The detected blocks are painted using either\nthe color.diff.{old,new}Moved color. Adjacent blocks cannot be\ntold apart.\n\nzebra\nBlocks of moved text are detected as in blocks mode. The blocks\nare painted using either the color.diff.{old,new}Moved color or\ncolor.diff.{old,new}MovedAlternative. The change between the\ntwo colors indicates that a new block was detected.\n\ndimmed-zebra\nSimilar to zebra, but additional dimming of uninteresting parts\nof moved code is performed. The bordering lines of two adjacent\nblocks are considered interesting, the rest is uninteresting.\ndimmedzebra is a deprecated synonym.\n",
                    "long": "--no-color"
                },
                {
                    "name": "--no-color-moved",
                    "content": "Turn off move detection. This can be used to override configuration\nsettings. It is the same as --color-moved=no.\n\n--color-moved-ws=<modes>\nThis configures how whitespace is ignored when performing the move\ndetection for --color-moved. These modes can be given as a comma\nseparated 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\nat line end, and considers all other sequences of one or more\nwhitespace characters to be equivalent.\n\nignore-all-space\nIgnore whitespace when comparing lines. This ignores\ndifferences even if one line has whitespace where the other\nline has none.\n\nallow-indentation-change\nInitially ignore any whitespace in the move detection, then\ngroup the moved code blocks only into a block if the change in\nwhitespace is the same per line. This is incompatible with the\nother modes.\n",
                    "long": "--no-color-moved"
                },
                {
                    "name": "--no-color-moved-ws",
                    "content": "Do not ignore whitespace when performing move detection. This can\nbe used to override configuration settings. It is the same as\n--color-moved-ws=no.\n\n--word-diff[=<mode>]\nShow a word diff, using the <mode> to delimit changed words. By\ndefault, words are delimited by whitespace; see --word-diff-regex\nbelow. The <mode> defaults to plain, and must 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\nescape the delimiters if they appear in the input, so the\noutput may be ambiguous.\n\nporcelain\nUse a special line-based format intended for script\nconsumption. Added/removed/unchanged runs are printed in the\nusual unified diff format, starting with a +/-/` ` character at\nthe beginning of the line and extending to the end of the line.\nNewlines in the input are represented by a tilde ~ on a line of\nits own.\n\nnone\nDisable word diff again.\n\nNote that despite the name of the first mode, color is used to\nhighlight the changed parts in all modes if enabled.\n\n--word-diff-regex=<regex>\nUse <regex> to decide what a word is, instead of considering runs\nof non-whitespace to be a word. Also implies --word-diff unless it\nwas already enabled.\n\nEvery non-overlapping match of the <regex> is considered a word.\nAnything between these matches is considered whitespace and\nignored(!) for the purposes of finding differences. You may want to\nappend |[^[:space:]] to your regular expression to make sure that\nit matches all non-whitespace characters. A match that contains a\nnewline is silently truncated(!) at the newline.\n\nFor example, --word-diff-regex=.  will treat each character as a\nword and, correspondingly, show differences character by character.\n\nThe regex can also be set via a diff driver or configuration\noption, see gitattributes(5) or git-config(1). Giving it explicitly\noverrides any diff driver or configuration setting. Diff drivers\noverride 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\nthe 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.\nWhat are considered whitespace errors is controlled by\ncore.whitespace configuration. By default, trailing whitespaces\n(including lines that consist solely of whitespaces) and a space\ncharacter that is immediately followed by a tab character inside\nthe initial indent of the line are considered whitespace errors.\nExits with non-zero status if problems are found. Not compatible\nwith --exit-code.\n\n--ws-error-highlight=<kind>\nHighlight whitespace errors in the context, old or new lines of the\ndiff. Multiple values are separated by comma, none resets previous\nvalues, default reset the list to new and all is a shorthand for\nold,new,context. When this option is not given, and the\nconfiguration variable diff.wsErrorHighlight is not set, only\nwhitespace errors in new lines are highlighted. The whitespace\nerrors 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\npost-image blob object names on the \"index\" line when generating\npatch format output.\n",
                    "long": "--full-index"
                },
                {
                    "name": "--binary",
                    "content": "In addition to --full-index, output a binary diff that can be\napplied with git-apply. Implies --patch.\n\n--abbrev[=<n>]\nInstead of showing the full 40-byte hexadecimal object name in\ndiff-raw format output and diff-tree header lines, show the\nshortest prefix that is at least <n> hexdigits long that uniquely\nrefers the object. In diff-patch output format, --full-index takes\nhigher precedence, i.e. if --full-index is specified, full blob\nnames will be shown regardless of --abbrev. Non default number of\ndigits 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.\nThis serves two purposes:\n\nIt affects the way a change that amounts to a total rewrite of a\nfile not as a series of deletion and insertion mixed together with\na very few lines that happen to match textually as the context, but\nas a single deletion of everything old followed by a single\ninsertion of everything new, and the number m controls this aspect\nof the -B option (defaults to 60%).  -B/70% specifies that less\nthan 30% of the original should remain in the result for Git to\nconsider it a total rewrite (i.e. otherwise the resulting patch\nwill be a series of deletion and insertion mixed together with\ncontext lines).\n\nWhen used with -M, a totally-rewritten file is also considered as\nthe source of a rename (usually -M only considers a file that\ndisappeared as the source of a rename), and the number n controls\nthis aspect of the -B option (defaults to 50%).  -B20% specifies\nthat a change with addition and deletion compared to 20% or more of\nthe file's size are eligible for being picked up as a possible\nsource of a rename to another file.\n\n-M[<n>], --find-renames[=<n>]\nIf generating diffs, detect and report renames for each commit. For\nfollowing files across renames while traversing history, see\n--follow. If n is specified, it is a threshold on the similarity\nindex (i.e. amount of addition/deletions compared to the file's\nsize). For example, -M90% means Git should consider a delete/add\npair to be a rename if more than 90% of the file hasn't changed.\nWithout a % sign, the number is to be read as a fraction, with a\ndecimal point before it. I.e., -M5 becomes 0.5, and is thus the\nsame as -M50%. Similarly, -M05 is the same as -M5%. To limit\ndetection to exact renames, use -M100%. The default similarity\nindex is 50%.\n\n-C[<n>], --find-copies[=<n>]\nDetect copies as well as renames. See also --find-copies-harder. If\nn is specified, it has 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\nthe original file of the copy was modified in the same changeset.\nThis flag makes the command inspect unmodified files as candidates\nfor the source of copy. This is a very expensive operation for\nlarge projects, so use it with caution. Giving more than one -C\noption has the same effect.\n",
                    "long": "--find-copies-harder"
                },
                {
                    "name": "-D, --irreversible-delete",
                    "content": "Omit the preimage for deletes, i.e. print only the header but not\nthe diff between the preimage and /dev/null. The resulting patch is\nnot meant to be applied with patch or git apply; this is solely for\npeople who want to just concentrate on reviewing the text after the\nchange. In addition, the output obviously lacks enough information\nto apply such a patch in reverse, even manually, hence the name of\nthe option.\n\nWhen used together with -B, omit also the preimage in the deletion\npart of a delete/create pair.\n",
                    "flag": "-D",
                    "long": "--irreversible-delete"
                },
                {
                    "name": "-l<num>",
                    "content": "The -M and -C options involve some preliminary steps that can\ndetect subsets of renames/copies cheaply, followed by an exhaustive\nfallback portion that compares all remaining unpaired destinations\nto all relevant sources. (For renames, only remaining unpaired\nsources are relevant; for copies, all original sources are\nrelevant.) For N sources and destinations, this exhaustive check is\nO(N^2). This option prevents the exhaustive portion of rename/copy\ndetection from running if the number of source/destination files\ninvolved 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),\nModified (M), Renamed (R), have their type (i.e. regular file,\nsymlink, submodule, ...) changed (T), are Unmerged (U), are Unknown\n(X), or have had their pairing Broken (B). Any combination of the\nfilter characters (including none) can be used. When *\n(All-or-none) is added to the combination, all paths are selected\nif there is any file that matches other criteria in the comparison;\nif there is no file that matches other criteria, nothing is\nselected.\n\nAlso, these upper-case letters can be downcased to exclude. E.g.\n--diff-filter=ad excludes added and deleted paths.\n\nNote that not all diffs can feature all types. For instance, diffs\nfrom the index to the working tree can never have Added entries\n(because the set of paths included in the diff is limited by what\nis in the index). Similarly, copied and renamed entries cannot\nappear if detection for those types is disabled.\n"
                },
                {
                    "name": "-S<string>",
                    "content": "Look for differences that change the number of occurrences of the\nspecified string (i.e. addition/deletion) in a file. Intended for\nthe scripter's use.\n\nIt is useful when you're looking for an exact block of code (like a\nstruct), and want to know the history of that block since it first\ncame into being: use the feature iteratively to feed the\ninteresting 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\nthat match <regex>.\n\nTo illustrate the difference between -S<regex> --pickaxe-regex and\n-G<regex>, consider a commit with the following diff in the same\nfile:\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\n-S\"frotz\\(nitfol\" --pickaxe-regex will not (because the number of\noccurrences of that string did not change).\n\nUnless --text is supplied patches of binary files without a\ntextconv filter will be ignored.\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\nspecified object. Similar to -S, just the argument is different in\nthat it doesn't search for a specific string but for a specific\nobject id.\n\nThe object can be a blob or a submodule commit. It implies the -t\noption in git-log to also find trees.\n"
                },
                {
                    "name": "--pickaxe-all",
                    "content": "When -S or -G finds a change, show all the changes in that\nchangeset, not just the files that contain the change in <string>.\n",
                    "long": "--pickaxe-all"
                },
                {
                    "name": "--pickaxe-regex",
                    "content": "Treat the <string> given to -S as an extended POSIX regular\nexpression to match.\n",
                    "long": "--pickaxe-regex"
                },
                {
                    "name": "-O<orderfile>",
                    "content": "Control the order in which files appear in the output. This\noverrides the diff.orderFile configuration variable (see git-\nconfig(1)). To cancel diff.orderFile, use -O/dev/null.\n\nThe output order is determined by the order of glob patterns in\n<orderfile>. All files with pathnames that match the first pattern\nare output first, all files with pathnames that match the second\npattern (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\nthere was an implicit match-all pattern at the end of the file. If\nmultiple pathnames have the same rank (they match the same pattern\nbut no earlier patterns), their output order relative to each other\nis the normal order.\n\n<orderfile> is parsed as follows:\n\no   Blank lines are ignored, so they can be used as separators for\nreadability.\n\no   Lines starting with a hash (\"#\") are ignored, so they can be\nused for comments. Add a backslash (\"\\\") to the beginning of\nthe pattern if it starts with a hash.\n\no   Each other line contains a single pattern.\n\nPatterns have the same syntax and semantics as patterns used for\nfnmatch(3) without the FNMPATHNAME flag, except a pathname also\nmatches a pattern if removing any number of the final pathname\ncomponents matches the pattern. For example, the pattern \"foo*bar\"\nmatches \"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.\nskip to), or move them to the end of the output (i.e.  rotate to).\nThese were invented primarily for use of the git difftool command,\nand may not be very useful otherwise.\n"
                },
                {
                    "name": "-R",
                    "content": "Swap two inputs; that is, show differences from index or on-disk\nfile to tree contents.\n\n--relative[=<path>], --no-relative\nWhen run from a subdirectory of the project, it can be told to\nexclude changes outside the directory and show pathnames relative\nto it with this option. When you are not in a subdirectory (e.g. in\na bare repository), you can name which subdirectory to make the\noutput relative to by giving a <path> as an argument.\n--no-relative can be used to countermand both diff.relative config\noption 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\nline end, and considers all other sequences of one or more\nwhitespace 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\neven if one line has whitespace 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\nspecified more than once.\n\n--inter-hunk-context=<lines>\nShow the context between diff hunks, up to the specified number of\nlines, thereby fusing hunks that are close to each other. Defaults\nto diff.interHunkContext or 0 if the config option is unset.\n",
                    "long": "--ignore-blank-lines"
                },
                {
                    "name": "-W, --function-context",
                    "content": "Show whole function as context lines for each change. The function\nnames are determined in the same way as git diff works out patch\nhunk headers (see Defining a custom hunk-header in\ngitattributes(5)).\n",
                    "flag": "-W",
                    "long": "--function-context"
                },
                {
                    "name": "--ext-diff",
                    "content": "Allow an external diff helper to be executed. If you set an\nexternal diff driver with gitattributes(5), you need to use this\noption 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\ncomparing binary files. See gitattributes(5) for details. Because\ntextconv filters are typically a one-way conversion, the resulting\ndiff is suitable for human consumption, but cannot be applied. For\nthis reason, textconv filters are enabled by default only for git-\ndiff(1) and git-log(1), but not for git-format-patch(1) or diff\nplumbing commands.\n\n--ignore-submodules[=<when>]\nIgnore changes to submodules in the diff generation. <when> can be\neither \"none\", \"untracked\", \"dirty\" or \"all\", which is the default.\nUsing \"none\" will consider the submodule modified when it either\ncontains untracked or modified files or its HEAD differs from the\ncommit recorded in the superproject and can be used to override any\nsettings of the ignore option in git-config(1) or gitmodules(5).\nWhen \"untracked\" is used submodules are not considered dirty when\nthey only contain untracked content (but they are still scanned for\nmodified content). Using \"dirty\" ignores all changes to the work\ntree of submodules, only changes to the commits stored in the\nsuperproject are shown (this was the behavior until 1.7.0). Using\n\"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\nempty file in \"git diff\" and a new file in \"git diff --cached\".\nThis option makes the entry appear as a new file in \"git diff\" and\nnon-existent in \"git diff --cached\". This option could be reverted\nwith --ita-visible-in-index. Both options are experimental and\ncould be removed in future.\n\nFor more detailed explanation on these common options, see also\ngitdiffcore(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-\ndiff-tree(1), or git-diff-files(1) with the -p option produces patch\ntext. You can customize the creation of patch text via the\nGITEXTERNALDIFF and the GITDIFFOPTS environment variables (see\ngit(1)), and the diff attribute (see gitattributes(5)).\n\nWhat the -p option produces is slightly different from the traditional\ndiff 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\ninvolved. Especially, even for a creation or a deletion, /dev/null\nis not used in place of the a/ or b/ filenames.\n\nWhen rename/copy is involved, file1 and file2 show the name of the\nsource file of the rename/copy and the name of the file that\nrename/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\ntype and file permission bits.\n\nPath names in extended headers do not include the a/ and b/\nprefixes.\n\nThe similarity index is the percentage of unchanged lines, and the\ndissimilarity index is the percentage of changed lines. It is a\nrounded down integer, followed by a percent sign. The similarity\nindex value of 100% is thus reserved for two equal files, while\n100% dissimilarity means that no line from the old file made it\ninto the new one.\n\nThe index line includes the blob object names before and after the\nchange. The <mode> is included if the file mode does not change;\notherwise, separate lines indicate the old and the new mode.\n\n3. Pathnames with \"unusual\" characters are quoted as explained for the\nconfiguration variable core.quotePath (see git-config(1)).\n\n4. All the file1 files in the output refer to files before the commit,\nand all the file2 files refer to files after the commit. It is\nincorrect to apply each change to each file sequentially. For\nexample, 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\napplies. See \"Defining a custom hunk-header\" in gitattributes(5)\nfor details of how to tailor to this to specific languages.\n",
            "subsections": []
        },
        "COMBINED DIFF FORMAT": {
            "content": "Any diff-generating command can take the -c or --cc option to produce a\ncombined diff when showing a merge. This is the default format when\nshowing merges with git-diff(1) or git-show(1). Note also that you can\ngive suitable --diff-merges option to any of these commands to force\ngeneration 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\n1. It is preceded with a \"git diff\" header, that looks like this (when\nthe -c option is used):\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\nshows a merge with two parents):\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\nthe <mode> is different from the rest. Extended headers with\ninformation about detected contents movement (renames and copying\ndetection) are designed to work with diff of two <tree-ish> and are\nnot 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,\n/dev/null is used to signal created or deleted files.\n\nHowever, if the --combined-all-paths option is provided, instead of\na two-line from-file/to-file you get a N+1 line from-file/to-file\nheader, where N is the number of parents 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\nactive, to allow you to see the original name of the file in\ndifferent parents.\n\n4. Chunk header format is modified to prevent people from accidentally\nfeeding it to patch -p1. Combined diff format was created for\nreview of merge commit changes, and was not meant to be applied.\nThe 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\nfor combined diff format.\n\nUnlike the traditional unified diff format, which shows two files A and\nB with a single column that has - (minus -- appears in A but removed in\nB), + (plus -- missing in A but added to B), or \" \" (space --\nunchanged) prefix, this format compares two or more files file1,\nfile2,... with one file X, and shows how X differs from each of fileN.\nOne column for each of fileN is prepended to the output line to note\nhow X's line is different from it.\n\nA - character in the column N means that the line appears in fileN but\nit does not appear in the result. A + character in the column N means\nthat the line appears in the result, and fileN does not have that line\n(in other words, the line was added, from the point of view of that\nparent).\n\nIn the above example output, the function signature was changed from\nboth files (hence two - removals from both file1 and file2, plus ++ to\nmean one line that was added does not appear in either file1 or file2).\nAlso eight other lines are the same from file1 but do not appear in\nfile2 (hence prefixed with +).\n\nWhen shown by git diff-tree -c, it compares the parents of a merge\ncommit with the merge result (i.e. file1..fileN are the parents). When\nshown by git diff-files -c, it compares the two unresolved merge\nparents 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": "git show v1.0.0\nShows the tag v1.0.0, along with the object the tags points at.\n\ngit show v1.0.0^{tree}\nShows the tree pointed to by the tag v1.0.0.\n\ngit show -s --format=%s v1.0.0^{commit}\nShows the subject of the commit pointed to by the tag v1.0.0.\n\ngit show next~10:Documentation/README\nShows the contents of the file Documentation/README as they were\ncurrent in the 10th last commit of the branch next.\n\ngit show master:Makefile master:t/Makefile\nConcatenates the contents of said Makefiles in the head of the\nbranch master.\n",
            "subsections": []
        },
        "DISCUSSION": {
            "content": "Git is to some extent character encoding agnostic.\n\no   The contents of the blob objects are uninterpreted sequences of\nbytes. There is no encoding translation at the core level.\n\no   Path names are encoded in UTF-8 normalization form C. This applies\nto tree objects, the index file, ref names, as well as path names\nin command line arguments, environment variables and config files\n(.git/config (see git-config(1)), gitignore(5), gitattributes(5)\nand gitmodules(5)).\n\nNote that Git at the core level treats path names simply as\nsequences of non-NUL bytes, there are no path name encoding\nconversions (except on Mac and Windows). Therefore, using non-ASCII\npath names will mostly work even on platforms and file systems that\nuse legacy extended ASCII encodings. However, repositories created\non such systems will not work properly on UTF-8-based systems (e.g.\nLinux, Mac, Windows) and vice versa. Additionally, many Git-based\ntools simply assume path names to be UTF-8 and will fail to display\nother encodings correctly.\n\no   Commit log messages are typically encoded in UTF-8, but other\nextended ASCII encodings are also supported. This includes\nISO-8859-x, CP125x and many others, but not UTF-16/32, EBCDIC and\nCJK multi-byte encodings (GBK, Shift-JIS, Big5, EUC-x, CP9xx etc.).\n\nAlthough we encourage that the commit log messages are encoded in\nUTF-8, both the core and Git Porcelain are designed not to force UTF-8\non projects. If all participants of a particular project find it more\nconvenient to use legacy encodings, Git does not forbid it. However,\nthere are a few things to keep in mind.\n\n1. git commit and git commit-tree issues a warning if the commit log\nmessage given to it does not look like a valid UTF-8 string, unless\nyou explicitly say your project uses a legacy encoding. The way to\nsay this is to have i18n.commitEncoding in .git/config file, like\nthis:\n\n[i18n]\ncommitEncoding = ISO-8859-1\n\nCommit objects created with the above setting record the value of\ni18n.commitEncoding in its encoding header. This is to help other\npeople who look at them later. Lack of this header implies that the\ncommit log message is encoded in UTF-8.\n\n2. git log, git show, git blame and friends look at the encoding\nheader of a commit object, and try to re-code the log message into\nUTF-8 unless otherwise specified. You can specify the desired\noutput encoding with i18n.logOutputEncoding in .git/config file,\nlike this:\n\n[i18n]\nlogOutputEncoding = ISO-8859-1\n\nIf you do not have this configuration variable, the value of\ni18n.commitEncoding is used instead.\n\nNote that we deliberately chose not to re-code the commit log message\nwhen a commit is made to force UTF-8 at the commit object level,\nbecause re-coding to UTF-8 is not necessarily a reversible operation.\n",
            "subsections": []
        },
        "GIT": {
            "content": "Part of the git(1) suite\n\nGit 2.34.1                        02/26/2026                       GIT-SHOW(1)",
            "subsections": []
        }
    },
    "summary": "git-show - Show various types of objects",
    "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": [
        "git show v1.0.0",
        "Shows the tag v1.0.0, along with the object the tags points at.",
        "git show v1.0.0^{tree}",
        "Shows the tree pointed to by the tag v1.0.0.",
        "git show -s --format=%s v1.0.0^{commit}",
        "Shows the subject of the commit pointed to by the tag v1.0.0.",
        "git show next~10:Documentation/README",
        "Shows the contents of the file Documentation/README as they were",
        "current in the 10th last commit of the branch next.",
        "git show master:Makefile master:t/Makefile",
        "Concatenates the contents of said Makefiles in the head of the",
        "branch master."
    ],
    "see_also": []
}