git documentation - en to zh_HANS-CN translation catalogue (1107 entries)

note: type: Plain text
en: Annotate only the line range given by '<start>,<end>', or by the function name regex '<funcname>'.  May be specified multiple times. Overlapping ranges are allowed.
zh_HANS-CN: 仅注释由'<start>，<end>'或功能名称正则表达式'<funcname>'给出的行范围。 可以指定多次。 允许重叠范围。

note: type: Plain text
en: '<start>' and '<end>' are optional. `-L <start>` or `-L <start>,` spans from '<start>' to end of file. `-L ,<end>` spans from start of file to '<end>'.
zh_HANS-CN: '<start>' 和 '<end>' 是可选的 `-L <start>` 或 `-L <start>,` 范围从 '<start>' 到文件末尾。 `-L ,<end>` 从文件开始到 '<end>'.

note: type: Plain text
en: Show long rev (Default: off).
zh_HANS-CN: 显示长转（默认值：关闭）。

note: type: Plain text
en: Show raw timestamp (Default: off).
zh_HANS-CN: 显示原始时间戳（默认值：关闭）。

note: type: Plain text
en: Use revisions from revs-file instead of calling linkgit:git-rev-list[1].
zh_HANS-CN: 使用revs-file中的修订，而不是调用linkgit：git-rev-list [1]。

note: type: Plain text
en: Walk history forward instead of backward. Instead of showing the revision in which a line appeared, this shows the last revision in which a line has existed. This requires a range of revision like START..END where the path to blame exists in START.  `git blame --reverse START` is taken as `git blame --reverse START..HEAD` for convenience.
zh_HANS-CN: 向前调用历史记录，而不向后调用历史记录。 与其显示行所在的修订，不显示行所在的最后一个修订。 这就需要进行一系列修订，例如START..END，其中的归咎路径在START中。 为方便起见，将git blame --reverse START。当作git blame --reverse START..HEAD。

note: type: Plain text
en: Specify the style in which conflicted hunks are written out to working tree files upon merge.  The default is "merge", which shows a `<<<<<<<` conflict marker, changes made by one side, a `=======` marker, changes made by the other side, and then a `>>>>>>>` marker.  An alternate style, "diff3", adds a `|||||||` marker and the original text before the `=======` marker.
zh_HANS-CN: 指定在合并时将冲突块写入工作树文件的样式。  默认是 "merge"，显示一个`<<<<<<<`冲突标记，一方的修改，一个`=======`标记，另一方的修改，然后是`>>>>>>>`标记。  另一种样式，"diff3"，增加了一个`|||||||`标记，并在`=======`标记前增加了原始文本。

note: type: Plain text
en: By default, Git does not create an extra merge commit when merging a commit that is a descendant of the current commit. Instead, the tip of the current branch is fast-forwarded. When set to `false`, this variable tells Git to create an extra merge commit in such a case (equivalent to giving the `--no-ff` option from the command line). When set to `only`, only such fast-forward merges are allowed (equivalent to giving the `--ff-only` option from the command line).
zh_HANS-CN: 默认情况下，当合并当前提交的后裔提交时，Git 不会创建一个额外的合并提交。相反，当前分支的顶端会被快进。当设置为 "false "时，这个变量告诉Git在这种情况下创建一个额外的合并提交（相当于在命令行中给出 "no-ff "选项）。当设置为`only`时，只允许这种快进合并（相当于从命令行给出`--ff-only`选项）。

note: type: Plain text
en: If true, this is equivalent to the --verify-signatures command line option. See linkgit:git-merge[1] for details.
zh_HANS-CN: 如果为真，这等同于 --verify-signatures 命令行选项。详见 linkgit:git-merge[1]。

note: type: Plain text
en: Whether Git detects renames.  If set to "false", rename detection is disabled. If set to "true", basic rename detection is enabled.  Defaults to the value of diff.renames.
zh_HANS-CN: Git是否会检测重名。  如果设置为 "false"，重名检测被禁用。如果设置为 "true"，则启用基本重名检测。  默认为 diff.renames 的值。

note: type: Plain text
en: Whether Git detects directory renames, affecting what happens at merge time to new files added to a directory on one side of history when that directory was renamed on the other side of history.  If merge.directoryRenames is set to "false", directory rename detection is disabled, meaning that such new files will be left behind in the old directory.  If set to "true", directory rename detection is enabled, meaning that such new files will be moved into the new directory.  If set to "conflict", a conflict will be reported for such paths.  If merge.renames is false, merge.directoryRenames is ignored and treated as false.  Defaults to "conflict".
zh_HANS-CN: Git是否检测目录重名，影响在合并时对历史一侧的目录被重命名时加入的新文件的处理。  如果merge.directoryRenames设置为 "false"，目录重名检测将被禁用，这意味着这些新文件将被遗留在旧目录中。  如果设置为 "true"，目录重名检测被启用，意味着这样的新文件将被移到新目录中。  如果设置为 "冲突"，将报告此类路径的冲突。  如果merge.renames为false，merge.directoryRenames将被忽略并被视为false。  默认为 "冲突"。

note: type: Plain text
en: Tell Git that canonical representation of files in the repository has changed over time (e.g. earlier commits record text files with CRLF line endings, but recent ones use LF line endings).  In such a repository, Git can convert the data recorded in commits to a canonical form before performing a merge to reduce unnecessary conflicts.  For more information, see section "Merging branches with differing checkin/checkout attributes" in linkgit:gitattributes[5].
zh_HANS-CN: 告诉 Git 仓库中文件的正则表示法随着时间的推移而改变（例如，早期的提交记录文本文件使用 CRLF 行结尾，但最近的提交使用 LF 行结尾）。  在这样的仓库中，Git 可以在执行合并之前将提交的数据转换为规范的形式，以减少不必要的冲突。  更多信息，请参阅 linkgit:gitattributes[5] 中的 "合并具有不同签入/签出属性的分支 "一节。

note: type: Plain text
en: Whether to print the diffstat between ORIG_HEAD and the merge result at the end of the merge.  True by default.
zh_HANS-CN: 是否在合并结束后打印ORIG_HEAD和合并结果之间的差异统计表。  默认为 "真"。

note: type: Plain text
en: When set to true, automatically create a temporary stash entry before the operation begins, and apply it after the operation ends.  This means that you can run merge on a dirty worktree.  However, use with care: the final stash application after a successful merge might result in non-trivial conflicts.  This option can be overridden by the `--no-autostash` and `--autostash` options of linkgit:git-merge[1].  Defaults to false.
zh_HANS-CN: 当设置为 "true "时，在操作开始前自动创建一个临时的储藏库条目，并在操作结束后应用它。  这意味着你可以在一个肮脏的工作树上运行merge。  然而，要小心使用：在成功的合并之后，最后的储藏库应用可能会导致非实质性的冲突。  这个选项可以被 linkgit:git-merge[1] 的 `--no-autostash` 和 `--autostash` 选项覆盖。  默认为false。

note: type: Plain text
en: Controls which merge tool is used by linkgit:git-mergetool[1].  The list below shows the valid built-in values.  Any other value is treated as a custom merge tool and requires that a corresponding mergetool.<tool>.cmd variable is defined.
zh_HANS-CN: 控制linkgit:git-mergetool[1]使用哪个合并工具。  下面的列表显示了有效的内置值。  任何其他值都被视为自定义的合并工具，需要定义一个相应的mergetool.<tool>.cmd变量。

note: type: Plain text
en: Controls which merge tool is used by linkgit:git-mergetool[1] when the -g/--gui flag is specified. The list below shows the valid built-in values.  Any other value is treated as a custom merge tool and requires that a corresponding mergetool.<guitool>.cmd variable is defined.
zh_HANS-CN: 控制linkgit:git-mergetool[1]在指定-g/-gui标志时使用的合并工具。下面的列表显示了有效的内置值。  任何其他值都被视为自定义的合并工具，需要定义一个相应的mergetool.<guitool>.cmd变量。

note: type: Plain text
en: Controls the amount of output shown by the recursive merge strategy.  Level 0 outputs nothing except a final error message if conflicts were detected. Level 1 outputs only conflicts, 2 outputs conflicts and file changes.  Level 5 and above outputs debugging information.  The default is level 2.  Can be overridden by the `GIT_MERGE_VERBOSITY` environment variable.
zh_HANS-CN: 控制递归合并策略所显示的输出量。  0级除了在检测到冲突时有一个最终的错误信息外，什么都不输出。1级只输出冲突，2级输出冲突和文件变化。  5级及以上输出调试信息。  默认是第2级。  可以通过`GIT_MERGE_VERBOSITY`环境变量覆盖。

note: type: Labeled list
en: merge.<driver>.name
zh_HANS-CN: 合并.<driver>.name

note: type: Plain text
en: Defines a human-readable name for a custom low-level merge driver.  See linkgit:gitattributes[5] for details.
zh_HANS-CN: 为自定义的低级合并驱动定义了一个人类可读的名字。  详情见 linkgit:gitattributes[5]。

note: type: Plain text
en: In addition to recognizing all date formats above, the `--date` option will also try to make sense of other, more human-centric date formats, such as relative dates like "yesterday" or "last Friday at noon".
zh_HANS-CN: 除了识别上述所有日期格式外，`--date` 选项还将尝试理解其它非标准化的日期格式，如 "昨天" 或 "上周五中午" 等相对日期。

note: type: Title -
en: Generating patch text with -p
zh_HANS-CN: 使用选项 `-p` 生成补丁文本

note: type: Plain text
en: What the -p option produces is slightly different from the traditional diff format:
zh_HANS-CN: -p 选项产生的内容与传统的差异格式略有不同：

note: type: Plain text
en: It is preceded with a "git diff" header that looks like this:
zh_HANS-CN: 它前面有一个 `git diff` 头，如下所示：

note: type: Plain text
en: The `a/` and `b/` filenames are the same unless rename/copy is involved.  Especially, even for a creation or a deletion, `/dev/null` is _not_ used in place of the `a/` or `b/` filenames.
zh_HANS-CN: `a/` 和 `b/` 的文件名相同，除非涉及到重命名/复制。特别地，即使是创建或删除，也 _不_ 使用 `/dev/null` 来代替 `a/` 或 `b/` 文件名。

note: type: Plain text
en: When rename/copy is involved, `file1` and `file2` show the name of the source file of the rename/copy and the name of the file that rename/copy produces, respectively.
zh_HANS-CN: 当涉及到重命名/复制时，`file1` 和 `file2` 分别显示重命名/复制的源文件的名称和重命名/复制产生的文件的名称。

note: type: Plain text
en: It is followed by one or more extended header lines:
zh_HANS-CN: 它的后面是一个或多个扩展头信息行：

note: type: Plain text
en: old mode <mode>
    new mode <mode>
    deleted file mode <mode>
    new file mode <mode>
    copy from <path>
    copy to <path>
    rename from <path>
    rename to <path>
    similarity index <number>
    dissimilarity index <number>
    index <hash>..<hash> <mode>
zh_HANS-CN: old mode <模式>
    new mode <模式>
    deleted file mode <模式>
    new file mode <模式>
    copy from <路径>
    copy to <路径>
    rename from <路径>
    rename to <路径>
    similarity index <数字>
    dissimilarity index <数字>
    index <哈希>..<哈希> <模式>

note: type: Plain text
en: File modes are printed as 6-digit octal numbers including the file type and file permission bits.
zh_HANS-CN: 文件模式被打印为6位八进制数字，包括文件类型和文件权限位。

note: type: Plain text
en: Path names in extended headers do not include the `a/` and `b/` prefixes.
zh_HANS-CN: 扩展头信息中的路径名称不包括 `a/` 和 `b/` 前缀。

note: type: Plain text
en: The similarity index is the percentage of unchanged lines, and the dissimilarity index is the percentage of changed lines.  It is a rounded down integer, followed by a percent sign.  The similarity index value of 100% is thus reserved for two equal files, while 100% dissimilarity means that no line from the old file made it into the new one.
zh_HANS-CN: 相似性指数是未改变的行占比，而不相似性指数是改变的行占比。它是四舍五入的整数，后有百分号。因此，100%的相似度指数指为两个文件相等，而 100% 的不相似度意味着入新文件中没有旧文件中的行。

note: type: Plain text
en: The index line includes the blob object names before and after the change.  The <mode> is included if the file mode does not change; otherwise, separate lines indicate the old and the new mode.
zh_HANS-CN: 索引行包括改变前和改变后的 blob 对象名称。如果文件模式没有变化，则包含 <模式>；否则，分别显示新旧模式。

note: type: Plain text
en: Pathnames with "unusual" characters are quoted as explained for the configuration variable `core.quotePath` (see linkgit:git-config[1]).
zh_HANS-CN: 含有 "不常见" 字符的路径名会被引用，这一点在配置变量` core.quotePath` 中有所解释（见 linkgit:git-config[1]）。

note: type: Plain text
en: All the `file1` files in the output refer to files before the commit, and all the `file2` files refer to files after the commit.  It is incorrect to apply each change to each file sequentially.  For example, this patch will swap a and b:
zh_HANS-CN: 输出中所有的 `file1` 文件都是指提交前的文件，而所有的 `file2` 文件都是指提交后的文件。按顺序对每个文件进行修改是不正确的。例如，这个补丁将交换文件 a 和 b：

note: type: Plain text
en: Hunk headers mention the name of the function to which the hunk applies.  See "Defining a custom hunk-header" in linkgit:gitattributes[5] for details of how to tailor to this to specific languages.
zh_HANS-CN: 块头提到了块头所适用的函数的名称。  参见 linkgit:gitattributes[5] 中的 "定义自定义 hunk-header"，以了解如何针对特定语言进行定制。

note: type: Title -
en: Combined diff format
zh_HANS-CN: 合并的差异格式

note: type: Plain text
en: Any diff-generating command can take the `-c` or `--cc` option to produce a 'combined diff' when showing a merge. This is the default format when showing merges with linkgit:git-diff[1] or linkgit:git-show[1]. Note also that you can give suitable `--diff-merges` option to any of these commands to force generation of diffs in specific format.
zh_HANS-CN: 任何生成差异的命令都可以使用 `-c` 或 `-cc` 选项，在显示合并时产生一个 "合并差异"。当用 linkgit:git-diff[1] 或 linkgit:git-show[1] 显示合并时，这默认格式。还需要注意的是，你可以给这些命令适当的 `--diff-merges` 选项来强制生成特定格式的差异。

note: type: Plain text
en: A "combined diff" format looks like this:
zh_HANS-CN: "合并的差异" 的格式如下：

note: type: Plain text
en: It is preceded with a "git diff" header, that looks like this (when the `-c` option is used):
zh_HANS-CN: 它前面有 "git diff" 头，如下（当使用 `c` 选项时）：

note: type: Plain text
en: or like this (when the `--cc` option is used):
zh_HANS-CN: 或如下（当使用 `--cc` 选项时）：

note: type: Plain text
en: It is followed by one or more extended header lines (this example shows a merge with two parents):
zh_HANS-CN: 它的后面是一个或多个扩展头信息行（本例显示的是与两个父提交的合并）：

note: type: Plain text
en: index <hash>,<hash>..<hash>
    mode <mode>,<mode>..<mode>
    new file mode <mode>
    deleted file mode <mode>,<mode>
zh_HANS-CN: index <哈希>,<哈希>..<哈希>
    mode <模式>,<模式>..<模式>
    new file mode <模式>
    deleted file mode <模式>,<模式>

note: type: Plain text
en: It is followed by two-line from-file/to-file header
zh_HANS-CN: 它的后面是两行源文件/目标文件的头信息

note: type: Plain text
en: a/file
zh_HANS-CN: Index.pg

note: type: Plain text
en: Similar to two-line header for traditional 'unified' diff format, `/dev/null` is used to signal created or deleted files.
zh_HANS-CN: 类似于传统的 "统一" 差异格式的双行头，`/dev/null` 用来表示创建或删除的文件。

note: type: Plain text
en: However, if the --combined-all-paths option is provided, instead of a two-line from-file/to-file you get a N+1 line from-file/to-file header, where N is the number of parents in the merge commit
zh_HANS-CN: 但是，如果提供了 --combined-all-paths 选项，你就会得到一个 N+1 行的源文件/目标文件头，其中 N 是合并提交中的父提交数量

note: type: Plain text
en: This extended format can be useful if rename or copy detection is active, to allow you to see the original name of the file in different parents.
zh_HANS-CN: 如果重命名或复制检测处于活动状态，这种扩展格式可能很有用，可以让你在不同的父提交中看到文件的原始名称。

note: type: Plain text
en: Chunk header format is modified to prevent people from accidentally feeding it to `patch -p1`. Combined diff format was created for review of merge commit changes, and was not meant to be applied. The change is similar to the change in the extended 'index' header:
zh_HANS-CN: 修改了文件块头信息的格式，以防止不小心将其送入 `patch -p1`。合并的差异格式是为审查合并提交的修改而创建的，并不是为了应用。这个变化类似于扩展的 "索引" 头信息的变化：

note: type: Plain text
en: There are (number of parents + 1) `@` characters in the chunk header for combined diff format.
zh_HANS-CN: 块中有（父提交数量+1）`@` 字符，用于合并的差异格式。

note: type: Plain text
en: Unlike the traditional 'unified' diff format, which shows two files A and B with a single column that has `-` (minus -- appears in A but removed in B), `+` (plus -- missing in A but added to B), or `" "` (space -- unchanged) prefix, this format compares two or more files file1, file2,... with one file X, and shows how X differs from each of fileN.  One column for each of fileN is prepended to the output line to note how X's line is different from it.
zh_HANS-CN: 与传统的 "统一" 差异格式不同，这种格式显示两个文件 A 和 B 的列，其中有 `-`（减号 -- 在 A 中出现，但在 B 中删除），`+`（加号 -- 在 A 中缺少，但在 B 中增加），或 `" "`（空格 -- 不变）前缀，这种格式比较两个或多个文件与一个文件 X，并显示 X 与其中每个文件的差异。文件中的每一个都有一列被前置在输出行中，以指出 X 的行与它的不同之处。

note: type: Plain text
en: A `-` character in the column N means that the line appears in fileN but it does not appear in the result.  A `+` character in the column N means that the line appears in the result, and fileN does not have that line (in other words, the line was added, from the point of view of that parent).
zh_HANS-CN: 第 N 列中的 `-` 字符意味着该行出现在文件 N 中，但它没有出现在结果文件中。第 N 列中的 `+` 字符意味着该行出现在结果文件中，而文件 N 中没有该行（换句话说，从该父提交的角度来看，该行是被添加的）。

note: type: Plain text
en: In the above example output, the function signature was changed from both files (hence two `-` removals from both file1 and file2, plus `++` to mean one line that was added does not appear in either file1 or file2).  Also eight other lines are the same from file1 but do not appear in file2 (hence prefixed with `+`).
zh_HANS-CN: 在上面的输出示例中，两个文件中的函数签名都被改变了（因此从文件 1 和文件 2 中都有表示删除的 `-`，而 `++` 表示被添加的一行没有出现在文件 1 或文件 2 中）。另外还有 8 行与文件 1 中的相同，但没有出现在文件 2 中（因此前缀为 `+`）。

note: type: Plain text
en: When shown by `git diff-tree -c`, it compares the parents of a merge commit with the merge result (i.e. file1..fileN are the parents).  When shown by `git diff-files -c`, it compares the two unresolved merge parents with the working tree file (i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka "their version").
zh_HANS-CN: 当用 `git diff-tree -c` 显示时，它将合并提交的父提交文件与合并结果进行比较（即文件 1 ... 文件 N 是父提交文件）。当用 `git diff-files -c` 显示时，它将两个未解决的合并父提交文件与工作树文件进行比较（即文件 1 是阶段 2 ，又称 "我们的版本"，文件 2 是阶段 3，又称 "他们的版本"）。

note: type: Plain text
en: Specify diff format to be used for merge commits. Default is {diff-merges-default} unless `--first-parent` is in use, in which case `first-parent` is the default.
zh_HANS-CN: 指定合并提交时使用的差异格式。默认为 {diff-merges-default}，但当使用 `--first-parent` 选项时，默认为 `first-parent`。

note: type: Plain text
en: Disable output of diffs for merge commits. Useful to override implied value.
zh_HANS-CN: 禁用合并提交时的差异输出。对覆盖隐含值很有用。

note: type: Plain text
en: This option makes merge commits show the full diff with respect to the first parent only.
zh_HANS-CN: 此选项使合并提交只显示与第一个父提交之间的完整差异。

note: type: Plain text
en: With this option, diff output for a merge commit shows the differences from each of the parents to the merge result simultaneously instead of showing pairwise diff between a parent and the result one at a time. Furthermore, it lists only files which were modified from all parents. `-c` implies `-p`.
zh_HANS-CN: 使用此选项，合并提交的差异输出将同时显示每个父提交与合并结果的差异，而不是一次显示一个父提交与结果之间的成对差异 。此外，它只列出所有父提交中修改的文件。`-c` 选项暗含 `-p` 选项。

note: type: Plain text
en: Show only names of changed files. The file names are often encoded in UTF-8.  For more information see the discussion about encoding in the linkgit:git-log[1] manual page.
zh_HANS-CN: 只显示更改过的文件的名称。文件名通常以 UTF-8 编码。  更多信息见 linkgit:git-log[1] 手册页中关于编码的讨论。

note: type: Plain text
en: 	If `n` is specified, it is a threshold on the similarity
    	index (i.e. amount of addition/deletions compared to the
    	file's size). For example, `-M90%` means Git should consider a
    	delete/add pair to be a rename if more than 90% of the file
    	hasn't changed.  Without a `%` sign, the number is to be read as
    	a fraction, with a decimal point before it.  I.e., `-M5` becomes
    	0.5, and is thus the same as `-M50%`.  Similarly, `-M05` is
    	the same as `-M5%`.  To limit detection to exact renames, use
    	`-M100%`.  The default similarity index is 50%.
zh_HANS-CN: 	如果指定了 `n`，则其为相似度指数阈值（即相比于文件大小的增/删量）。
    	例如，`-M90％` 表示如果文件90％以上的内容没有更改，则 Git 应将删除/添加对视为重命名。
    	如果没有 `％` 符号，则该数字应作为小数读取，并在其前面加上小数点。
     	即 `-M5` 变为 0.5，因此与 `-M50％` 相同。 同样，`-M05` 与 `-M5％` 相同。
     	要将检测限制为精确的重命名，请使用 `-M100％`。 默认相似度指数为50％。

note: type: Plain text
en: Omit the preimage for deletes, i.e. print only the header but not the diff between the preimage and `/dev/null`. The resulting patch is not meant to be applied with `patch` or `git apply`; this is solely for people who want to just concentrate on reviewing the text after the change. In addition, the output obviously lacks enough information to apply such a patch in reverse, even manually, hence the name of the option.
zh_HANS-CN: 删除时省略原内容，即只打印头信息，而不打原内容和 `/dev/null` 之间的差异。所产生的补丁并不是要用于 `patch` 或 `git apply`；这只是为了让人们只专注于审查修改后的文本。此外，输出结果显然缺乏足够的信息来反转，或手动应用这样一个补丁，因此这个选项的名称如此。

note: type: Plain text
en: When used together with `-B`, omit also the preimage in the deletion part of a delete/create pair.
zh_HANS-CN: 当与 `-B` 一起使用时，也省略删除/创建对中删除部分的原内容。

note: type: Labeled list
en: -l<num>
zh_HANS-CN: -l<数量>

note: type: Plain text
en: Select only files that are Added (`A`), Copied (`C`), Deleted (`D`), Modified (`M`), Renamed (`R`), have their type (i.e. regular file, symlink, submodule, ...) changed (`T`), are Unmerged (`U`), are Unknown (`X`), or have had their pairing Broken (`B`).  Any combination of the filter characters (including none) can be used.  When `*` (All-or-none) is added to the combination, all paths are selected if there is any file that matches other criteria in the comparison; if there is no file that matches other criteria, nothing is selected.
zh_HANS-CN: 只选择添加（`A`）、复制（`C`）、删除（`D`）、修改（`M`）、重命名（`R`）、类型（即常规文件、符号链接、子模块......）改变（`T`）、未合并（`U`）、未知（`X`）或配对被破坏（`B`）的文件。可以使用过滤字符的任何组合（包括空）。当组合中加入 `*`（全部或空）时，如果在比较中有任何文件与其他条件匹配，则选择所有路径；如果没有符合其他条件的文件，则不会选择任何内容。

note: type: Plain text
en: Also, these upper-case letters can be downcased to exclude.  E.g.  `--diff-filter=ad` excludes added and deleted paths.
zh_HANS-CN: 另外，这些大写字母也可以通过使用小写排除。例如：`--diff-filter=ad` 排除添加和删除的路径。

note: type: Plain text
en: Note that not all diffs can feature all types. For instance, diffs from the index to the working tree can never have Added entries (because the set of paths included in the diff is limited by what is in the index).  Similarly, copied and renamed entries cannot appear if detection for those types is disabled.
zh_HANS-CN: 请注意，并不是所有的差异都能包含所有类型。例如，从索引到工作树的差异永远不会有添加（Added）条目（因为差异中包含的路径集受索引中的内容的限制）。同样，如果禁止检测复制和重命名的条目，这些类型也不会出现。

note: type: Plain text
en: Look for differences that change the number of occurrences of the specified string (i.e. addition/deletion) in a file.  Intended for the scripter's use.
zh_HANS-CN: 寻找改变文件中指定字符串出现次数的差异（即增加/删除）。供脚本编写者使用。

note: type: Plain text
en: Binary files are searched as well.
zh_HANS-CN: 二进制文件也会被搜索到。

note: type: Plain text
en: Look for differences whose patch text contains added/removed lines that match <regex>.
zh_HANS-CN: 查找其补丁文本包含与 <正则表达式> 匹配的添加/删除行的差异。

note: type: Plain text
en: To illustrate the difference between `-S<regex> --pickaxe-regex` and `-G<regex>`, consider a commit with the following diff in the same file:
zh_HANS-CN: 为了说明 `-S<正则表达式> --pickaxe-regex` 和 `-G<正则表达式>` 之间的区别，假设某次提交在同一文件中有以下差异：

note: type: Plain text
en: While `git log -G"frotz\(nitfol"` will show this commit, `git log -S"frotz\(nitfol" --pickaxe-regex` will not (because the number of occurrences of that string did not change).
zh_HANS-CN: `git log -G "frotz\(nitfol"` 会显示这次提交，但 `git log -S "frotz\(nitfol" --pickaxe-regex` 不会显示（因为该字符串的出现次数没有改变）。

note: type: Plain text
en: See the 'pickaxe' entry in linkgit:gitdiffcore[7] for more information.
zh_HANS-CN: 更多信息请参见 linkgit:gitdiffcore[7] 中的 'pickaxe' 条目。

note: type: Plain text
en: Look for differences that change the number of occurrences of the specified object. Similar to `-S`, just the argument is different in that it doesn't search for a specific string but for a specific object id.
zh_HANS-CN: 查找指定对象出现次数的差异。与 `-S` 类似，只是参数不同：它不搜索特定的字符串，而是搜索特定的对象 id。

note: type: Plain text
en: The object can be a blob or a submodule commit. It implies the `-t` option in `git-log` to also find trees.
zh_HANS-CN: 该对象可以是一个 blob 或一个子模块提交。它意味着 `git-log` 中的 `-t` 选项也能找到工作树。

note: type: Plain text
en: When `-S` or `-G` finds a change, show all the changes in that changeset, not just the files that contain the change in <string>.
zh_HANS-CN: 当使用 `-S` 或 `-G` 选项找到一个更改时，显示该更改集中的所有更改，而不仅仅是显示包含 <string> 更改的文件。

note: type: Plain text
en: Treat the <string> given to `-S` as an extended POSIX regular expression to match.
zh_HANS-CN: 将 `-S` 选项的 <string> 参数当作扩展的 POSIX 正则表达式来匹配。

note: type: Labeled list
en: -O<orderfile>
zh_HANS-CN: -O<顺序控制文件>

note: type: Plain text
en: Control the order in which files appear in the output.  This overrides the `diff.orderFile` configuration variable (see linkgit:git-config[1]).  To cancel `diff.orderFile`, use `-O/dev/null`.
zh_HANS-CN: 控制文件在输出中出现的顺序。这将覆盖 `diff.orderFile` 配置变量（参见 linkgit:git-config[1]）。要取消 `diff.orderFile`，请使用 `-O/dev/null`。

note: type: Plain text
en: The output order is determined by the order of glob patterns in <orderfile>.  All files with pathnames that match the first pattern are output first, all files with pathnames that match the second pattern (but not the first) are output next, and so on.  All files with pathnames that do not match any pattern are output last, as if there was an implicit match-all pattern at the end of the file.  If multiple pathnames have the same rank (they match the same pattern but no earlier patterns), their output order relative to each other is the normal order.
zh_HANS-CN: 输出顺序由 <顺序控制文件> 中的 glob 模式的顺序决定。所有路径名与第一个模式匹配的文件首先输出，路径名与第二个模式匹配（但不与第一个模式匹配）的文件其次输出，以此类推。所有路径名与任何模式匹配的文件会最后输出，就像在文件末尾有一个隐含的全部匹配模式。如果多个路径名具有相同的等级（它们匹配相同的模式，但没有匹配先前的模式），它们相对于彼此的输出顺序是正常的。

note: type: Plain text
en: <orderfile> is parsed as follows:
zh_HANS-CN: <顺序控制文件> 格式如下：

note: type: Plain text
en: Blank lines are ignored, so they can be used as separators for readability.
zh_HANS-CN: 空白行会被忽略，因此可以用它们作为分隔符，以保证可读性。

note: type: Plain text
en: Lines starting with a hash ("`#`") are ignored, so they can be used for comments.  Add a backslash ("`\`") to the beginning of the pattern if it starts with a hash.
zh_HANS-CN: 以井号（"`#`"）开头的行会被忽略，所以它们可以用来做注释。如果模式以井号开头，则需要在模式的开头加上反斜杠（"`\`"）。

note: type: Plain text
en: Each other line contains a single pattern.
zh_HANS-CN: 每一行都包含一个模式。

note: type: Plain text
en: Patterns have the same syntax and semantics as patterns used for fnmatch(3) without the FNM_PATHNAME flag, except a pathname also matches a pattern if removing any number of the final pathname components matches the pattern.  For example, the pattern "`foo*bar`" matches "`fooasdfbar`" and "`foo/bar/baz/asdf`" but not "`foobarx`".
zh_HANS-CN: 模式的语法和语义与 fnmatch(3) 中使用的相同，不包括 FNM_PATHNAME 标志，但在删除路径名中结尾任意几个成分后匹配的情况下例外。例如，模式 "`foo*bar`" 匹配 "`fooasdfbar`" 和 "`foo/bar/baz/asdf`"，但不匹配 "`foobarx`"。

note: type: Plain text
en: Discard the files before the named <file> from the output (i.e. 'skip to'), or move them to the end of the output (i.e. 'rotate to').  These were invented primarily for use of the `git difftool` command, and may not be very useful otherwise.
zh_HANS-CN: 从输出中丢弃命名为 <文件> 之前的文件（即 '跳过'），或将它们移到输出的末尾（即 '旋转'）。这些选项主要是为了使用 `git difftool` 命令而添加的，在其他情况下可能不是很有用。

note: type: Plain text
en: Swap two inputs; that is, show differences from index or on-disk file to tree contents.
zh_HANS-CN: 交换两个输入；即显示从索引或磁盘文件到目录树内容的差异。

note: type: Labeled list
en: --relative[=<path>]
zh_HANS-CN: --relative[=<路径>]

note: type: Plain text
en: When run from a subdirectory of the project, it can be told to exclude changes outside the directory and show pathnames relative to it with this option.  When you are not in a subdirectory (e.g. in a bare repository), you can name which subdirectory to make the output relative to by giving a <path> as an argument.  `--no-relative` can be used to countermand both `diff.relative` config option and previous `--relative`.
zh_HANS-CN: 当从项目的子目录中运行时，可以排除目录外的变化，并通过这个选项显示相对于它的路径名。当你不在子目录中时（例如在纯仓库中），你可以通过 <路径> 参数来指明要使输出相对于哪个子目录。`--no-relative` 可以用来取消 `diff.relative`配置选项和之前的 `--relative` 选项。

note: type: Plain text
en: Ignore carriage-return at the end of line when doing a comparison.
zh_HANS-CN: 在进行比较时，忽略行末的回车。

note: type: Plain text
en: Ignore whitespace when comparing lines.  This ignores differences even if one line has whitespace where the other line has none.
zh_HANS-CN: 比较行时忽略空格。即使一行有空格而另一行没有空格，也会忽略差异。

note: type: Plain text
en: Ignore changes whose lines are all blank.
zh_HANS-CN: 忽略空白行的变化。

note: type: Plain text
en: Show the context between diff hunks, up to the specified number of lines, thereby fusing hunks that are close to each other.  Defaults to `diff.interHunkContext` or 0 if the config option is unset.
zh_HANS-CN: 显示块差异之间的上下文，最多显示指定的行数，从而合并彼此接近的块。 默认认为 `diff.interHunkContext`，如果配置选项未设置，则默认为0。

note: type: Plain text
en: Show whole function as context lines for each change.  The function names are determined in the same way as `git diff` works out patch hunk headers (see 'Defining a custom hunk-header' in linkgit:gitattributes[5]).
zh_HANS-CN: 在每个修改中的上下文行显示整个函数。函数名称的确定方式与 `git diff` 计算补丁头的方式相同（参见 linkgit:gitattributes[5] 中的 '自定义区块头' ）。

note: type: Plain text
en: Make the program exit with codes similar to diff(1).  That is, it exits with 1 if there were differences and 0 means no differences.
zh_HANS-CN: 让程序以类似 diff(1) 的代码退出。也就是说，如果有差异则返回1，否则返回0。

note: type: Plain text
en: Disable all output of the program. Implies `--exit-code`.
zh_HANS-CN: 禁用程序的所有输出。暗含 `--exit-code`。

note: type: Plain text
en: Disallow external diff drivers.
zh_HANS-CN: 禁止使用外部差异器。

note: type: Plain text
en: Allow (or disallow) external text conversion filters to be run when comparing binary files. See linkgit:gitattributes[5] for details. Because textconv filters are typically a one-way conversion, the resulting diff is suitable for human consumption, but cannot be applied. For this reason, textconv filters are enabled by default only for linkgit:git-diff[1] and linkgit:git-log[1], but not for linkgit:git-format-patch[1] or diff plumbing commands.
zh_HANS-CN: 允许（或不允许）在比较二进制文件时运行外部文本转换过滤器。详情请参见 linkgit:gitattributes[5] 。由于文本转换过滤器通常是单向转换，因此产生的差异适合人类用户使用，但不能应用（apply）。因此默认情况下，只有 linkgit:git-diff[1] 和 linkgit:git-log[1] 启用文本转换过滤器，而 linkgit:git-format-patch[1] 或 diff plumbing 命令则不启用。

note: type: Plain text
en: Ignore changes to submodules in the diff generation. <when> can be either "none", "untracked", "dirty" or "all", which is the default.  Using "none" will consider the submodule modified when it either contains untracked or modified files or its HEAD differs from the commit recorded in the superproject and can be used to override any settings of the 'ignore' option in linkgit:git-config[1] or linkgit:gitmodules[5]. When "untracked" is used submodules are not considered dirty when they only contain untracked content (but they are still scanned for modified content). Using "dirty" ignores all changes to the work tree of submodules, only changes to the commits stored in the superproject are shown (this was the behavior until 1.7.0). Using "all" hides all changes to submodules.
zh_HANS-CN: 在生成差异时忽略子模块的修改。<when> 可以是 "none"、"untracked"、"dirty " 或 "all"，"all" 是默认选项。使用 "none" 会在子模块包含未跟踪或修改的文件，或者它的HEAD 与上级项目中记录的提交不同时，认为它被修改了，并且可以用来覆盖 linkgit:git-config[1] 或 linkgit:gitmodules[5] 中 '忽略' 选项的设置。当使用 "untracked" 时，当子模块只包含未跟踪的内容时，它们不会被认为是有改动的（但它们仍然会被扫描是否有被修改的内容）。使用 "dirty" 会忽略所有对子模块工作树的修改，只有存储在上级项目中的提交的修改才会被显示出来（这是在1.7.0之前的行为）。使用 "all" 会隐藏所有对子模块的修改。

note: type: Plain text
en: Do not show any source or destination prefix.
zh_HANS-CN: 不显示任何源或目的前缀。

note: type: Plain text
en: Prepend an additional prefix to every line of output.
zh_HANS-CN: 在每一行输出前加上一个额外的前缀。

note: type: Plain text
en: By default entries added by "git add -N" appear as an existing empty file in "git diff" and a new file in "git diff --cached".  This option makes the entry appear as a new file in "git diff" and non-existent in "git diff --cached". This option could be reverted with `--ita-visible-in-index`. Both options are experimental and could be removed in future.
zh_HANS-CN: 默认情况下，通过 "git add -N" 添加的条目在 "git diff" 中显示为现有的空文件，在 "git diff --cached" 中显示为新文件。这个选项使得条目在 "git diff" 中显示为一个新文件，而在 "git diff --cached" 中显示为不存在的文件。这个选项可以用 `--ita-visible-in-index` 来还原。这两个选项都是试验性的，将来可能会被删除。

note: type: Plain text
en: For more detailed explanation on these common options, see also linkgit:gitdiffcore[7].
zh_HANS-CN: 关于这些常用选项的更多解释，请参见 linkgit:gitdiffcore[7]。

note: type: Labeled list
en: --shallow-since=<date>
zh_HANS-CN: --shallow-since=<日期>

note: type: Labeled list
en: --shallow-exclude=<revision>
zh_HANS-CN: --shallow-exclude=<修订版本>

note: type: Plain text
en: Be verbose.
zh_HANS-CN: 详细日志。

note: type: Labeled list
en: -o <option>
zh_HANS-CN: -o <选项>

note: type: Labeled list
en: --server-option=<option>
zh_HANS-CN: --server-option=<选项>

note: type: Plain text
en: Transmit the given string to the server when communicating using protocol version 2.  The given string must not contain a NUL or LF character.  The server's handling of server options, including unknown ones, is server-specific.  When multiple `--server-option=<option>` are given, they are all sent to the other side in the order listed on the command line.
zh_HANS-CN: 使用协议版本2进行通信时，将给定的字符串传输到服务器。给定的字符串不得包含NUL或LF字符。服务器对服务器选项（包括未知选项）的处理是取决于服务器。当给出多个`--server-option = <option>`时，它们都按照命令行中列出的顺序发送到另一端。

note: type: Title -
en: NAME
zh_HANS-CN: 名称

note: type: Plain text
en: git-add - Add file contents to the index
zh_HANS-CN: git-add - 添加文件内容到索引

note: type: Title -
en: SYNOPSIS
zh_HANS-CN: 概述

note: type: Title -
en: DESCRIPTION
zh_HANS-CN: 描述

note: type: Plain text
en: This command updates the index using the current content found in the working tree, to prepare the content staged for the next commit.  It typically adds the current content of existing paths as a whole, but with some options it can also be used to add content with only part of the changes made to the working tree files applied, or remove paths that do not exist in the working tree anymore.
zh_HANS-CN: 该命令使用工作区的内容来更新索引，为下一次提交准备暂存的内容。通常情况下会添加当前目录的所有内容到索引，但是通过某些选项，它也可以用于仅添加对工作树文件所做的部分更改，或删除工作树中不存在的路径。

note: type: Plain text
en: The "index" holds a snapshot of the content of the working tree, and it is this snapshot that is taken as the contents of the next commit.  Thus after making any changes to the working tree, and before running the commit command, you must use the `add` command to add any new or modified files to the index.
zh_HANS-CN: 索引区中储存着一份工作区的快照，在下次提交时这份快照会被保存到 Git 仓库中。因此在工作区做过修改后以及在运行下一次提交命令前，你必须通过 `add` 命令来添加新创建的文件或者保存新的改动到索引中。

note: type: Plain text
en: This command can be performed multiple times before a commit.  It only adds the content of the specified file(s) at the time the add command is run; if you want subsequent changes included in the next commit, then you must run `git add` again to add the new content to the index.
zh_HANS-CN: 提交前可以多次执行此命令。它仅在运行add命令时添加指定文件的内容；如果要在下一次提交中包含后续更改，则必须再次运行`git add`将新内容添加到索引中。

note: type: Plain text
en: The `git status` command can be used to obtain a summary of which files have changes that are staged for the next commit.
zh_HANS-CN: `git status` 命令可用于获取摘要，说明哪些变化的文件已暂存，准备下一次提交。

note: type: Plain text
en: The `git add` command will not add ignored files by default.  If any ignored files were explicitly specified on the command line, `git add` will fail with a list of ignored files.  Ignored files reached by directory recursion or filename globbing performed by Git (quote your globs before the shell) will be silently ignored.  The 'git add' command can be used to add ignored files with the `-f` (force) option.
zh_HANS-CN: `git add` 命令默认不会添加被忽略的文件。如果在命令行上明确指定了任何被忽略的文件，则`git add`会失败，并显示被忽略文件的列表。由目录递归或Git执行的文件名通配符（在shell之前引用的通配符）所涉及的忽略文件将被静默忽略。 'git add' 命令可用于通过 -f 选项（force）强制添加忽略的文件。

note: type: Plain text
en: Please see linkgit:git-commit[1] for alternative ways to add content to a commit.
zh_HANS-CN: 请参阅 linkgit:git-commit[1] 了解将内容添加到提交的其他替代方法。

note: type: Title -
en: OPTIONS
zh_HANS-CN: 选项

note: type: Plain text
en: Files to add content from.  Fileglobs (e.g. `*.c`) can be given to add all matching files.  Also a leading directory name (e.g. `dir` to add `dir/file1` and `dir/file2`) can be given to update the index to match the current state of the directory as a whole (e.g.  specifying `dir` will record not just a file `dir/file1` modified in the working tree, a file `dir/file2` added to the working tree, but also a file `dir/file3` removed from the working tree). Note that older versions of Git used to ignore removed files; use `--no-all` option if you want to add modified or new files but ignore removed ones.
zh_HANS-CN: 要从中添加内容的文件。Fileglobs（例如 `*.c`）可以用来添加所有匹配的文件。此外，还可以提供一个前导目录名（例如，指定 `dir` 以添加 `dir/file1` 和 `dir/file2`）来更新索引，使其与整个目录的当前状态相匹配（例如，指定 `dir` 不仅会记录在工作树中修改的文件 `dir/file1`，还会记录在工作树中添加的文件 `dir/file2`，还有从工作树中删除的文件 `dir/file3`）。请注意，旧版本的 Git 会忽略已删除的文件；如果要添加已修改的文件或新文件，但忽略已删除的文件，请使用 `--no all` 选项。

note: type: Plain text
en: For more details about the <pathspec> syntax, see the 'pathspec' entry in linkgit:gitglossary[7].
zh_HANS-CN: 有关 <指定路径> 格式的更多细节，请参考 linkgit:gitglossary[7]。

note: type: Plain text
en: This option can only be used together with --dry-run. By using this option the user can check if any of the given files would be ignored, no matter if they are already present in the work tree or not.
zh_HANS-CN: 此选项只能与--dry-run一起使用。通过使用此选项，用户可以检查是否会忽略任何给定的文件，无论它们是否已存在于工作树中。

note: type: Plain text
en: By default, `git add` will warn when adding an embedded repository to the index without using `git submodule add` to create an entry in `.gitmodules`. This option will suppress the warning (e.g., if you are manually performing operations on submodules).
zh_HANS-CN: 默认情况下， `git add` 将在向索引添加嵌入式存储库时发出警告，而不使用 `git submodule add` 在 `.gitmodules` 中创建条目。此选项将抑制警告（例如，如果手动对子模块执行操作）。

note: type: Plain text
en: Apply the "clean" process freshly to all tracked files to forcibly add them again to the index.  This is useful after changing `core.autocrlf` configuration or the `text` attribute in order to correct files added with wrong CRLF/LF line endings.  This option implies `-u`.
zh_HANS-CN: 对所有跟踪的文件应用`clean`过程，将它们再次强制添加到索引中。这在更改`core.autocrlf`配置或`text`属性以更正添加了错误CRLF/LF行结尾的文件后非常有用。此选项隐含`-u`选项。

note: type: Plain text
en: GPG-sign commits. The `keyid` argument is optional and defaults to the committer identity; if specified, it must be stuck to the option without a space. `--no-gpg-sign` is useful to countermand both `commit.gpgSign` configuration variable, and earlier `--gpg-sign`.
zh_HANS-CN: GPG 签名提交。`keyid` 参数是可选的，默认为提交者身份；如果指定了，则必须与选项相连，不加空格。`--no-gpg-sign` 用于还原 `commit.gpgSign` 配置变量和先前的 `--gpg-sign`。

note: type: Title -
en: CONFIGURATION
zh_HANS-CN: 配置

note: type: Title -
en: SUBMODULES
zh_HANS-CN: 子模块

note: type: Labeled list
en: -<number>
zh_HANS-CN: -<数>

note: type: Title -
en: MAPPING AUTHORS
zh_HANS-CN: 制图作者

note: type: Plain text
en: git-branch - List, create, or delete branches
zh_HANS-CN: git-branch - 列出、创建或删除分支

note: type: Plain text
en: 'git branch' [--color[=<when>] | --no-color] [--show-current]
    	[-v [--abbrev=<n> | --no-abbrev]]
    	[--column[=<options>] | --no-column] [--sort=<key>]
    	[--merged [<commit>]] [--no-merged [<commit>]]
    	[--contains [<commit>]] [--no-contains [<commit>]]
    	[--points-at <object>] [--format=<format>]
    	[(-r | --remotes) | (-a | --all)]
    	[--list] [<pattern>...]
    'git branch' [--track | --no-track] [-f] <branchname> [<start-point>]
    'git branch' (--set-upstream-to=<upstream> | -u <upstream>) [<branchname>]
    'git branch' --unset-upstream [<branchname>]
    'git branch' (-m | -M) [<oldbranch>] <newbranch>
    'git branch' (-c | -C) [<oldbranch>] <newbranch>
    'git branch' (-d | -D) [-r] <branchname>...
    'git branch' --edit-description [<branchname>]
zh_HANS-CN: 'git branch' [--color[=<when>] |--no-color] [--show-current]
    	[-v [--abbrev=<n> |--no-abbrev] ]
    	[--column[=<options>] | --no-column][--sort=<key>]
    	[--合并 [<commit>]][--no-merged [<commit>]]。
    	[--包含[<commit>]][--no-contains [<commit>]] [--contains [<commit>]]
    	[--points-at <object>] [--format=<format>]。
    	[(-r | --remotes) | (-a | --all)
    	[--列表] [<pattern>...]
    'git branch' [--track |-no-track] [-f] <branchname> [<start-point>]。
    'git branch' (-set-upstream-to=<upstream> | -u <upstream>) [<branchname>]
    'git branch' --unset-upstream [<branchname>]
    'git branch' (-m | -M) [<oldbranch>] <newbranch>
    'git branch' (-c | -C) [<oldbranch>] <newbranch>
    'git branch' (-d | -D) [-r] <branchname>...
    'git branch' --edit-description [<branchname>])

note: type: Plain text
en: If `--list` is given, or if there are no non-option arguments, existing branches are listed; the current branch will be highlighted in green and marked with an asterisk.  Any branches checked out in linked worktrees will be highlighted in cyan and marked with a plus sign. Option `-r` causes the remote-tracking branches to be listed, and option `-a` shows both local and remote branches.
zh_HANS-CN: 如果给了`--list`，或者没有非选项参数，现有的分支将被列出；当前的分支将以绿色突出显示，并标有星号。  在链接的工作树中检查出来的任何分支将以青色突出显示，并标有加号。选项`-r`导致远程跟踪的分支被列出，选项`-a`显示本地和远程分支。

note: type: Plain text
en: If a `<pattern>` is given, it is used as a shell wildcard to restrict the output to matching branches. If multiple patterns are given, a branch is shown if it matches any of the patterns.
zh_HANS-CN: 如果给出了`<pattern>`，它被用作shell通配符，将输出限制在匹配的分支上。如果给出多个模式，如果一个分支与任何模式相匹配，就会显示出来。

note: type: Plain text
en: Note that when providing a `<pattern>`, you must use `--list`; otherwise the command may be interpreted as branch creation.
zh_HANS-CN: 注意，当提供"<pattern>"时，必须使用"--list"；否则命令可能被解释为创建分支。

note: type: Plain text
en: With `--contains`, shows only the branches that contain the named commit (in other words, the branches whose tip commits are descendants of the named commit), `--no-contains` inverts it. With `--merged`, only branches merged into the named commit (i.e. the branches whose tip commits are reachable from the named commit) will be listed.  With `--no-merged` only branches not merged into the named commit will be listed.  If the <commit> argument is missing it defaults to `HEAD` (i.e. the tip of the current branch).
zh_HANS-CN: 使用 `--contains` 时，只显示包含指定提交的分支（换句话说，尖端提交是指定提交的后裔的分支），`--no-contains` 会反过来。如果使用 `--merged`，则只列出被合并到指定提交的分支（即其顶端提交可以从指定提交处到达的分支）。  如果使用"--no-merged"，则只列出未被合并到指定提交的分支。  如果缺少<commit>参数，则默认为`HEAD`（即当前分支的顶端）。

note: type: Plain text
en: The command's second form creates a new branch head named <branchname> which points to the current `HEAD`, or <start-point> if given. As a special case, for <start-point>, you may use `"A...B"` as a shortcut for the merge base of `A` and `B` if there is exactly one merge base. You can leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
zh_HANS-CN: 该命令的第二种形式是创建一个名为<branchname>的新分支头，该分支头指向当前的`HEAD`，如果给定的话，则指向<start-point>。作为一种特殊情况，对于<start-point>，你可以使用`"A...B "作为`A`和`B`的合并基础的快捷方式，如果正好有一个合并基础。你最多可以省略`A`和`B`中的一个，在这种情况下，它默认为`HEAD`。

note: type: Plain text
en: Note that this will create the new branch, but it will not switch the working tree to it; use "git switch <newbranch>" to switch to the new branch.
zh_HANS-CN: 注意，这将创建新的分支，但不会将工作树切换到它；使用 "git switch <newbranch>"来切换到新的分支。

note: type: Plain text
en: When a local branch is started off a remote-tracking branch, Git sets up the branch (specifically the `branch.<name>.remote` and `branch.<name>.merge` configuration entries) so that 'git pull' will appropriately merge from the remote-tracking branch. This behavior may be changed via the global `branch.autoSetupMerge` configuration flag. That setting can be overridden by using the `--track` and `--no-track` options, and changed later using `git branch --set-upstream-to`.
zh_HANS-CN: 当一个本地分支从远程跟踪的分支开始时，Git 会设置该分支（特别是 `branch.<name>.remote` 和 `branch.<name>.merge` 配置项），以便 "git pull "能适当地从远程跟踪的分支合并。这种行为可以通过全局的 `branch.autoSetupMerge` 配置标志来改变。该设置可以通过使用`--track`和`--no-track`选项来覆盖，并在之后使用`git branch --set-upstream-to`来改变。

note: type: Plain text
en: With a `-m` or `-M` option, <oldbranch> will be renamed to <newbranch>.  If <oldbranch> had a corresponding reflog, it is renamed to match <newbranch>, and a reflog entry is created to remember the branch renaming. If <newbranch> exists, -M must be used to force the rename to happen.
zh_HANS-CN: 使用`-m`或`-M`选项，<oldbranch>将被重命名为<newbranch>。  如果 <oldbranch> 有相应的 reflog，它将被重命名以匹配 <newbranch>，并创建一个 reflog 条目以记住分支重命名。如果 <newbranch> 存在，必须使用 -M 来强制重命名。

note: type: Plain text
en: The `-c` and `-C` options have the exact same semantics as `-m` and `-M`, except instead of the branch being renamed, it will be copied to a new name, along with its config and reflog.
zh_HANS-CN: `-c`和`-C`选项的语义与`-m`和`-M`完全相同，只不过不是对分支进行重命名，而是将其连同其配置和日志一起复制到一个新的名称。

note: type: Plain text
en: With a `-d` or `-D` option, `<branchname>` will be deleted.  You may specify more than one branch for deletion.  If the branch currently has a reflog then the reflog will also be deleted.
zh_HANS-CN: 使用`-d`或`-D`选项，`<branchname>`将被删除。  你可以指定一个以上的分支进行删除。  如果该分支目前有一个reflog，那么reflog也将被删除。

note: type: Plain text
en: Use `-r` together with `-d` to delete remote-tracking branches. Note, that it only makes sense to delete remote-tracking branches if they no longer exist in the remote repository or if 'git fetch' was configured not to fetch them again. See also the 'prune' subcommand of linkgit:git-remote[1] for a way to clean up all obsolete remote-tracking branches.
zh_HANS-CN: 使用 `-r` 和 `-d` 来删除远程跟踪的分支。注意，只有当远程分支不再存在于远程仓库或 "git fetch "被配置为不再获取它们时，删除远程跟踪分支才有意义。参见 linkgit:git-remote[1] 的 "prune "子命令，它可以清理所有过时的远程跟踪分支。

note: type: Plain text
en: Delete a branch. The branch must be fully merged in its upstream branch, or in `HEAD` if no upstream was set with `--track` or `--set-upstream-to`.
zh_HANS-CN: 删除一个分支。该分支必须完全合并在其上游分支中，如果没有用`--track`或`--set-upstream-to`设置的上游分支，则必须在`HEAD`中。

note: type: Plain text
en: Shortcut for `--delete --force`.
zh_HANS-CN: `--delete --force`的快捷方式。

note: type: Plain text
en: Create the branch's reflog.  This activates recording of all changes made to the branch ref, enabling use of date based sha1 expressions such as "<branchname>@\{yesterday}".  Note that in non-bare repositories, reflogs are usually enabled by default by the `core.logAllRefUpdates` config option.  The negated form `--no-create-reflog` only overrides an earlier `--create-reflog`, but currently does not negate the setting of `core.logAllRefUpdates`.
zh_HANS-CN: 创建该分支的 reflog。  这将激活对该分支参考文献所做的所有修改的记录，使其能够使用基于日期的sha1表达式，如"<branchname>@{yesterday}"。  请注意，在非空白仓库中， reflogs通常由`core.logAllRefUpdates`配置选项默认启用。  否定的形式`--no-create-reflog`只覆盖先前的`--create-reflog`，但目前并不否定`core.logAllRefUpdates`的设置。

note: type: Plain text
en: Shortcut for `--move --force`.
zh_HANS-CN: `--move --force`的快捷方式。

note: type: Plain text
en: Shortcut for `--copy --force`.
zh_HANS-CN: `--copy --force`的快捷方式。

note: type: Plain text
en: Color branches to highlight current, local, and remote-tracking branches.  The value must be always (the default), never, or auto.
zh_HANS-CN: 给分支着色，以突出当前、本地和远程跟踪的分支。  该值必须是始终（默认）、从不或自动。

note: type: Plain text
en: Turn off branch colors, even when the configuration file gives the default to color output.  Same as `--color=never`.
zh_HANS-CN: 关闭分支的颜色，即使在配置文件中默认为彩色输出。  与`--color=never`相同。

note: type: Plain text
en: Sorting and filtering branches are case insensitive.
zh_HANS-CN: 排序和过滤分支是不分大小写的。

note: type: Labeled list
en: --column[=<options>]
zh_HANS-CN: --column[=<选项>]

note: type: Plain text
en: Display branch listing in columns. See configuration variable `column.branch` for option syntax. `--column` and `--no-column` without options are equivalent to 'always' and 'never' respectively.
zh_HANS-CN: 在列中显示分支列表。选项语法见配置变量`column.branch`。`--column`和`--no-column`没有选项，分别相当于'always'和'never'。

note: type: Plain text
en: This option is only applicable in non-verbose mode.
zh_HANS-CN: 这个选项只适用于非粗话模式。

note: type: Plain text
en: List or delete (if used with -d) the remote-tracking branches.  Combine with `--list` to match the optional pattern(s).
zh_HANS-CN: 列出或删除（如果与-d一起使用）远程跟踪的分支。  与`--list`结合使用，以匹配可选的模式（s）。

note: type: Plain text
en: List both remote-tracking branches and local branches.  Combine with `--list` to match optional pattern(s).
zh_HANS-CN: 列出远程跟踪的分支和本地分支。  与`--list`组合，以匹配可选的模式。

note: type: Plain text
en: List branches.  With optional `<pattern>...`, e.g. `git branch --list 'maint-*'`, list only the branches that match the pattern(s).
zh_HANS-CN: 列出分支。  使用可选的"<pattern>..."，例如 "git branch --list 'maint-*'"，只列出符合该模式的分支。

note: type: Plain text
en: Print the name of the current branch. In detached HEAD state, nothing is printed.
zh_HANS-CN: 打印当前分支的名称。在分离的HEAD状态下，不打印任何东西。

note: type: Plain text
en: When in list mode, show sha1 and commit subject line for each head, along with relationship to upstream branch (if any). If given twice, print the path of the linked worktree (if any) and the name of the upstream branch, as well (see also `git remote show <remote>`).  Note that the current worktree's HEAD will not have its path printed (it will always be your current directory).
zh_HANS-CN: 当在列表模式下，显示每个头的sha1和提交主题行，以及与上游分支的关系（如果有的话）。如果给了两次，也会打印链接的工作树的路径（如果有的话）和上游分支的名称（也见 `git remote show <remote>`）。  请注意，当前工作树的HEAD不会打印其路径（它总是你的当前目录）。

note: type: Plain text
en: Be more quiet when creating or deleting a branch, suppressing non-error messages.
zh_HANS-CN: 在创建或删除一个分支时更加安静，抑制非错误信息。

note: type: Plain text
en: In the verbose listing that show the commit object name, show the shortest prefix that is at least '<n>' hexdigits long that uniquely refers the object.  The default value is 7 and can be overridden by the `core.abbrev` config option.
zh_HANS-CN: 在显示提交对象名称的冗长列表中，显示至少有'<n>'个六位数的最短前缀，以唯一地指代该对象。  默认值是7，可以通过`core.abbrev`配置选项覆盖。

note: type: Plain text
en: Display the full sha1s in the output listing rather than abbreviating them.
zh_HANS-CN: 在输出列表中显示完整的sha1，而不是缩写它们。

note: type: Plain text
en: When creating a new branch, set up `branch.<name>.remote` and `branch.<name>.merge` configuration entries to mark the start-point branch as "upstream" from the new branch. This configuration will tell git to show the relationship between the two branches in `git status` and `git branch -v`. Furthermore, it directs `git pull` without arguments to pull from the upstream when the new branch is checked out.
zh_HANS-CN: 在创建新分支时，设置`branch.<name>.remote`和`branch.<name>.merge`配置项，将起始点分支标记为新分支的 "上游"。这个配置将告诉git在`git status`和`git branch -v`中显示这两个分支之间的关系。此外，它还指示`git pull`在新分支被检出时，不带参数地从上游提取。

note: type: Plain text
en: This behavior is the default when the start point is a remote-tracking branch.  Set the branch.autoSetupMerge configuration variable to `false` if you want `git switch`, `git checkout` and `git branch` to always behave as if `--no-track` were given. Set it to `always` if you want this behavior when the start-point is either a local or remote-tracking branch.
zh_HANS-CN: 当起点是一个远程跟踪的分支时，这种行为是默认的。  如果你想让 "git switch"、"git checkout "和 "git branch "总是表现得像"--no-track "一样，就把 branch.autoSetupMerge 配置变量设为 "false"。如果你想在起始点是本地或远程跟踪的分支时有这种行为，则将其设置为`always`。

note: type: Plain text
en: Do not set up "upstream" configuration, even if the branch.autoSetupMerge configuration variable is true.
zh_HANS-CN: 不要设置 "上游 "配置，即使 branch.autoSetupMerge 配置变量为 true。

note: type: Plain text
en: As this option had confusing syntax, it is no longer supported.  Please use `--track` or `--set-upstream-to` instead.
zh_HANS-CN: 由于这个选项的语法混乱，不再支持。  请使用`--track`或`--set-upstream-to`代替。

note: type: Labeled list
en: -u <upstream>
zh_HANS-CN: -u <上行>

note: type: Plain text
en: Set up <branchname>'s tracking information so <upstream> is considered <branchname>'s upstream branch. If no <branchname> is specified, then it defaults to the current branch.
zh_HANS-CN: 设置<branchname>的跟踪信息，使<upstream>被视为<branchname>的上游分支。如果没有指定<branchname>，则默认为当前分支。

note: type: Plain text
en: Remove the upstream information for <branchname>. If no branch is specified it defaults to the current branch.
zh_HANS-CN: 删除<branchname>的上游信息。如果没有指定分支，则默认为当前分支。

note: type: Plain text
en: Open an editor and edit the text to explain what the branch is for, to be used by various other commands (e.g. `format-patch`, `request-pull`, and `merge` (if enabled)). Multi-line explanations may be used.
zh_HANS-CN: 打开一个编辑器，编辑文本，解释该分支的用途，以便被其他各种命令（如`format-patch`、`request-pull`和`merge`（如果启用））使用。可以使用多行解释。

note: type: Plain text
en: Only list branches which contain the specified commit (HEAD if not specified). Implies `--list`.
zh_HANS-CN: 只列出包含指定提交的分支（如果没有指定则为HEAD）。意味着 `--list`。

note: type: Plain text
en: Only list branches which don't contain the specified commit (HEAD if not specified). Implies `--list`.
zh_HANS-CN: 只列出不包含指定提交的分支（如果不指定则为HEAD）。意味着 `--list`。

note: type: Plain text
en: Only list branches whose tips are reachable from the specified commit (HEAD if not specified). Implies `--list`.
zh_HANS-CN: 只列出从指定的提交（如果没有指定，则为HEAD）可以到达的分支的提示。意味着 `--list`。

note: type: Plain text
en: Only list branches whose tips are not reachable from the specified commit (HEAD if not specified). Implies `--list`.
zh_HANS-CN: 只列出从指定的提交（如果没有指定，则为HEAD）中无法到达的分支。意味着 `--list`。

note: type: Plain text
en: The name of the branch to create or delete.  The new branch name must pass all checks defined by linkgit:git-check-ref-format[1].  Some of these checks may restrict the characters allowed in a branch name.
zh_HANS-CN: 要创建或删除的分支的名称。  新的分支名必须通过 linkgit:git-check-ref-format[1] 定义的所有检查。  其中一些检查可能会限制分支名称中允许的字符。

note: type: Labeled list
en: <start-point>
zh_HANS-CN: <起始点

note: type: Plain text
en: The new branch head will point to this commit.  It may be given as a branch name, a commit-id, or a tag.  If this option is omitted, the current HEAD will be used instead.
zh_HANS-CN: 新的分支头将指向这个提交。  它可以是一个分支名，一个提交号，或者一个标签。  如果省略此选项，将使用当前的HEAD来代替。

note: type: Plain text
en: The name of an existing branch to rename.
zh_HANS-CN: 要重命名的现有分支的名称。

note: type: Plain text
en: The new name for an existing branch. The same restrictions as for <branchname> apply.
zh_HANS-CN: 现有分支的新名称。与<branchname>的限制相同。

note: type: Labeled list
en: --sort=<key>
zh_HANS-CN: --排序=<键>

note: type: Plain text
en: Sort based on the key given. Prefix `-` to sort in descending order of the value. You may use the --sort=<key> option multiple times, in which case the last key becomes the primary key. The keys supported are the same as those in `git for-each-ref`. Sort order defaults to the value configured for the `branch.sort` variable if exists, or to sorting based on the full refname (including `refs/...` prefix). This lists detached HEAD (if present) first, then local branches and finally remote-tracking branches. See linkgit:git-config[1].
zh_HANS-CN: 根据给定的键进行排序。前缀"-"表示按照数值的降序排序。你可以多次使用--sort=<key>选项，在这种情况下，最后一个键成为主键。支持的键与`git for-each-ref`中的键相同。排序顺序默认为`branch.sort`变量的配置值（如果存在），或者基于完整的 refname（包括 `refs/...` 前缀）进行排序。这将首先列出分离的 HEAD（如果存在），然后是本地分支，最后是远程跟踪分支。参见 linkgit:git-config[1]。

note: type: Plain text
en: Only list branches of the given object.
zh_HANS-CN: 只列出给定对象的分支。

note: type: Plain text
en: A string that interpolates `%(fieldname)` from a branch ref being shown and the object it points at.  The format is the same as that of linkgit:git-for-each-ref[1].
zh_HANS-CN: 一个字符串，从正在显示的分支参考文献和它所指向的对象中插值`%(fieldname)'。  其格式与linkgit:git-for-each-ref[1]的格式相同。

note: type: Plain text
en: `pager.branch` is only respected when listing branches, i.e., when `--list` is used or implied. The default is to use a pager.  See linkgit:git-config[1].
zh_HANS-CN: `pager.branch`只在列出分支时被尊重，即使用或暗示使用`--list`时。默认情况是使用 pager。  参见 linkgit:git-config[1]。

note: type: Labeled list
en: Start development from a known tag
zh_HANS-CN: 从一个已知的标签开始开发

note: type: delimited block -
en: $ git clone git://git.kernel.org/pub/scm/.../linux-2.6 my2.6
    $ cd my2.6
    $ git branch my2.6.14 v2.6.14   <1>
    $ git switch my2.6.14
zh_HANS-CN: $ git clone git://git.kernel.org/pub/scm/.../linux-2.6 my2.6
    $ cd my2.6
    $ git branch my2.6.14 v2.6.14 <1>.
    $ git switch my2.6.14

note: type: Plain text
en: This step and the next one could be combined into a single step with "checkout -b my2.6.14 v2.6.14".
zh_HANS-CN: 这一步和下一步可以用 "checkout -b my2.6.14 v2.6.14 "合并为一个步骤。

note: type: Labeled list
en: Delete an unneeded branch
zh_HANS-CN: 删除一个不需要的分支

note: type: Plain text
en: Delete the remote-tracking branches "todo", "html" and "man". The next 'fetch' or 'pull' will create them again unless you configure them not to.  See linkgit:git-fetch[1].
zh_HANS-CN: 删除远程跟踪的分支 "todo"、"html "和 "man"。下一次的 "fetch "或 "pull "会再次创建它们，除非你配置它们不这样做。  参见 linkgit:git-fetch[1]。

note: type: Plain text
en: Delete the "test" branch even if the "master" branch (or whichever branch is currently checked out) does not have all commits from the test branch.
zh_HANS-CN: 删除 "测试 "分支，即使 "主 "分支（或当前签出的任何一个分支）没有测试分支的所有提交。

note: type: Labeled list
en: Listing branches from a specific remote
zh_HANS-CN: 从一个特定的远端列出分支

note: type: Plain text
en: Using `-a` would conflate <remote> with any local branches you happen to have been prefixed with the same <remote> pattern.
zh_HANS-CN: 使用`-a`会将<remote>与任何你碰巧以相同的<remote>模式为前缀的本地分支混淆。

note: type: Plain text
en: `for-each-ref` can take a wide range of options. See linkgit:git-for-each-ref[1]
zh_HANS-CN: `for-each-ref`可以接受一系列的选项。参见 linkgit:git-for-each-ref[1] 。

note: type: Plain text
en: Patterns will normally need quoting.
zh_HANS-CN: 图案通常需要引证。

note: type: Plain text
en: If you are creating a branch that you want to switch to immediately, it is easier to use the "git switch" command with its `-c` option to do the same thing with a single command.
zh_HANS-CN: 如果你正在创建一个你想立即切换到的分支，使用 "git switch "命令及其`-c`选项，用一条命令做同样的事情，会更容易。

note: type: Plain text
en: The options `--contains`, `--no-contains`, `--merged` and `--no-merged` serve four related but different purposes:
zh_HANS-CN: 选项`--包含`、`--不包含`、`--合并`和`--不合并`有四个相关但不同的目的。

note: type: Plain text
en: `--contains <commit>` is used to find all branches which will need special attention if <commit> were to be rebased or amended, since those branches contain the specified <commit>.
zh_HANS-CN: `--contains <commit>`用于查找所有在<commit>被重新编译或修改时需要特别关注的分支，因为这些分支包含指定的<commit>。

note: type: Plain text
en: `--no-contains <commit>` is the inverse of that, i.e. branches that don't contain the specified <commit>.
zh_HANS-CN: `--no-contains <commit>`是其反义词，即不包含指定<commit>的分支。

note: type: Plain text
en: `--merged` is used to find all branches which can be safely deleted, since those branches are fully contained by HEAD.
zh_HANS-CN: `--merged`用于查找所有可以安全删除的分支，因为这些分支被HEAD完全包含。

note: type: Plain text
en: `--no-merged` is used to find branches which are candidates for merging into HEAD, since those branches are not fully contained by HEAD.
zh_HANS-CN: `--no-merged`是用来寻找可以合并到HEAD的候选分支，因为这些分支没有被HEAD完全包含。

note: type: Plain text
en: linkgit:git-check-ref-format[1], linkgit:git-fetch[1], linkgit:git-remote[1], link:user-manual.html#what-is-a-branch[``Understanding history: What is a branch?''] in the Git User's Manual.
zh_HANS-CN: linkgit:git-check-ref-format[1], linkgit:git-fetch[1], linkgit:git-remote[1], link:user-manual.html#what-is-a-branch[``了解历史：什么是分支？'] 在 Git User's Manual。

note: type: Plain text
en: Do not interpret any more arguments as options.
zh_HANS-CN: 不将之后的参数解释为选项。

note: type: Plain text
en: Progress status is reported on the standard error stream by default when it is attached to a terminal, unless `--quiet` is specified. This flag enables progress reporting even if not attached to a terminal, regardless of `--quiet`.
zh_HANS-CN: 当它附加到终端时，除非指定 `--quiet`，否则默认情况下会在标准错误流中报告进度状态。这个标志可以启用进度报告，即使没有附在到终端，而不管 `--quiet`。

note: type: Plain text
en: The same as `--merge` option above, but changes the way the conflicting hunks are presented, overriding the `merge.conflictStyle` configuration variable.  Possible values are "merge" (default) and "diff3" (in addition to what is shown by "merge" style, shows the original contents).
zh_HANS-CN: 与上面的 `--merge` 选项相同，但改变了冲突块的显示方式，覆盖 `merge.conflictStyle` 配置变量。可能的值是 "merge"（默认）和 "diff3"（除了 "merge" 样式显示的内容外，还显示原始内容）。

note: type: Plain text
en: As a special case, you may use `"A...B"` as a shortcut for the merge base of `A` and `B` if there is exactly one merge base. You can leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
zh_HANS-CN: 作为一种特殊情况，如果正好有一个合并基数，你可以使用`"A...B "作为`A`和`B`的合并基数的快捷方式。你最多可以漏掉`A`和`B`中的一个，在这种情况下，它默认为`HEAD`。

note: type: Plain text
en: Limits the paths affected by the operation.
zh_HANS-CN: 限制受操作影响的路径。

note: type: Plain text
en: For more details, see the 'pathspec' entry in linkgit:gitglossary[7].
zh_HANS-CN: 更多细节请参见 linkgit:gitglossary[7] 中的 '路径规范' 条目。

note: type: Plain text
en: take a file out of another commit
zh_HANS-CN: 将一个文件从另一个提交中取出

note: type: Labeled list
en: --cleanup=<mode>
zh_HANS-CN: --cleanup=<模式>

note: type: Plain text
en: *NOTE*: this operation can race with concurrent modification to the
    source repository, similar to running `cp -r src dst` while modifying
    `src`.
zh_HANS-CN: *注意*：该操作可能与并发的源仓库修改产生产竞争，类似于在运行 `cp -r src dst` 时同时修改 `src`。

note: type: Plain text
en: Force the cloning process from a repository on a local filesystem to copy the files under the `.git/objects` directory instead of using hardlinks. This may be desirable if you are trying to make a back-up of your repository.
zh_HANS-CN: 从本地文件系统上的存储库进行克隆时，强制复制 `.git / objects` 目录下的文件，而不使用硬链接。如果您要备份存储库，则可能需要这样做。

note: type: Plain text
en: When the repository to clone is on the local machine, instead of using hard links, automatically setup `.git/objects/info/alternates` to share the objects with the source repository.  The resulting repository starts out without any object of its own.
zh_HANS-CN: 当要克隆的存储库位于本地计算机上时，不使用硬链接，而是自动设置 `.git/objects/info/alternates` 与源存储库共享对象。生成的存储库开始时没有其自己的任何对象。

note: type: Plain text
en: Fail if the source repository is a shallow repository.  The 'clone.rejectShallow' configuration variable can be used to specify the default.
zh_HANS-CN: 如果源版本库是一个浅层版本库，则失败。  clone.rejectShallow "配置变量可以用来指定默认值。

note: type: Plain text
en: git-commit - Record changes to the repository
zh_HANS-CN: git-commit - 记录仓库的修改

note: type: Plain text
en: Create a new commit containing the current contents of the index and the given log message describing the changes. The new commit is a direct child of HEAD, usually the tip of the current branch, and the branch is updated to point to it (unless no branch is associated with the working tree, in which case HEAD is "detached" as described in linkgit:git-checkout[1]).
zh_HANS-CN: 创建一个新的提交，包含索引的当前内容和描述变化的给定日志信息。新的提交是 HEAD 的直接子节点，通常是当前分支的顶端，分支会被更新以指向它（除非工作树上没有分支，在这种情况下 HEAD 会被 "分离"，如 linkgit:git-checkout[1] 所述）。

note: type: Plain text
en: The content to be committed can be specified in several ways:
zh_HANS-CN: 要承诺的内容可以用几种方式指定。

note: type: Plain text
en: by using linkgit:git-add[1] to incrementally "add" changes to the index before using the 'commit' command (Note: even modified files must be "added");
zh_HANS-CN: 通过使用linkgit:git-add[1]，在使用'commit'命令之前，逐步将修改内容 "添加 "到索引中（注意：即使是修改过的文件也必须被 "添加"）。

note: type: Plain text
en: by using linkgit:git-rm[1] to remove files from the working tree and the index, again before using the 'commit' command;
zh_HANS-CN: 通过使用 linkgit:git-rm[1] 从工作树和索引中删除文件，同样在使用 "提交 "命令之前。

note: type: Plain text
en: by listing files as arguments to the 'commit' command (without --interactive or --patch switch), in which case the commit will ignore changes staged in the index, and instead record the current content of the listed files (which must already be known to Git);
zh_HANS-CN: 在这种情况下，提交会忽略索引中的变化，而是记录所列文件的当前内容（这些文件必须已经为 Git 所知）。

note: type: Plain text
en: by using the -a switch with the 'commit' command to automatically "add" changes from all known files (i.e. all files that are already listed in the index) and to automatically "rm" files in the index that have been removed from the working tree, and then perform the actual commit;
zh_HANS-CN: 通过在'commit'命令中使用-a开关，自动 "添加 "所有已知文件的修改（即所有已经列在索引中的文件），并自动 "清除 "索引中已经从工作树中删除的文件，然后执行实际的提交。

note: type: Plain text
en: by using the --interactive or --patch switches with the 'commit' command to decide one by one which files or hunks should be part of the commit in addition to contents in the index, before finalizing the operation. See the ``Interactive Mode'' section of linkgit:git-add[1] to learn how to operate these modes.
zh_HANS-CN: 通过在'commit'命令中使用 --interactive 或 --patch 开关，在最终完成操作之前，逐一决定哪些文件或块应该成为提交的一部分，而不是索引中的内容。参见 linkgit:git-add[1] 的 ``交互式模式'一节，了解如何操作这些模式。

note: type: Plain text
en: The `--dry-run` option can be used to obtain a summary of what is included by any of the above for the next commit by giving the same set of parameters (options and paths).
zh_HANS-CN: `--dry-run`选项可以用来获得上述任何一个选项为下一次提交所包含的内容的摘要，只要给出相同的参数（选项和路径）即可。

note: type: Plain text
en: If you make a commit and then find a mistake immediately after that, you can recover from it with 'git reset'.
zh_HANS-CN: 如果你做了一个提交，然后紧接着发现了一个错误，你可以用'git reset'来恢复它。

note: type: Plain text
en: Tell the command to automatically stage files that have been modified and deleted, but new files you have not told Git about are not affected.
zh_HANS-CN: 告诉命令自动阶段化已经被修改和删除的文件，但你没有告诉 Git 的新文件不受影响。

note: type: Plain text
en: Take an existing commit object, and reuse the log message and the authorship information (including the timestamp)  when creating the commit.
zh_HANS-CN: 取一个现有的提交对象，并在创建提交时重新使用日志信息和作者信息（包括时间戳）。

note: type: Labeled list
en: --reedit-message=<commit>
zh_HANS-CN: --reedit-message=<commit>。

note: type: Plain text
en: Like '-C', but with `-c` the editor is invoked, so that the user can further edit the commit message.
zh_HANS-CN: 和'-C'一样，但用`-c'会调用编辑器，这样用户可以进一步编辑提交信息。

note: type: Plain text
en: Create a new commit which "fixes up" `<commit>` when applied with `git rebase --autosquash`. Plain `--fixup=<commit>` creates a "fixup!" commit which changes the content of `<commit>` but leaves its log message untouched. `--fixup=amend:<commit>` is similar but creates an "amend!" commit which also replaces the log message of `<commit>` with the log message of the "amend!" commit.  `--fixup=reword:<commit>` creates an "amend!" commit which replaces the log message of `<commit>` with its own log message but makes no changes to the content of `<commit>`.
zh_HANS-CN: 创建一个新的提交，在使用 `git rebase --autosquash` 时，"修复"`<commit>`。普通的`--fixup=<commit>`会创建一个 "fixup!"的提交，改变`<commit>`的内容，但不改变其日志信息。`--fixup=amend:<commit>`类似，但会创建一个 "修正！"的提交，同时用 "修正！"的提交的日志信息替换`<commit>`的日志信息。  `--fixup=reword:<commit>`创建一个 "修正！"提交，用自己的日志信息替换`<commit>`的日志信息，但不对`<commit>`的内容做任何修改。

note: type: Plain text
en: The commit created by plain `--fixup=<commit>` has a subject composed of "fixup!" followed by the subject line from <commit>, and is recognized specially by `git rebase --autosquash`. The `-m` option may be used to supplement the log message of the created commit, but the additional commentary will be thrown away once the "fixup!" commit is squashed into `<commit>` by `git rebase --autosquash`.
zh_HANS-CN: 由普通的`--fixup=<commit>`创建的提交，其主题由 "fixup!"和<commit>的主题行组成，并被`git rebase --autosquash`特别识别。`-m`选项可以用来补充创建提交的日志信息，但一旦 "fixup!"提交被`git rebase --autosquash`压入`<commit>`，额外的注释就会被扔掉。

note: type: Plain text
en: The commit created by `--fixup=amend:<commit>` is similar but its subject is instead prefixed with "amend!". The log message of <commit> is copied into the log message of the "amend!" commit and opened in an editor so it can be refined. When `git rebase --autosquash` squashes the "amend!" commit into `<commit>`, the log message of `<commit>` is replaced by the refined log message from the "amend!" commit. It is an error for the "amend!" commit's log message to be empty unless `--allow-empty-message` is specified.
zh_HANS-CN: 由`--fixup=amend:<commit>`创建的提交与此类似，但其主题前缀为 "amend!"。<commit>的日志信息会被复制到 "amend!"提交的日志信息中，并在编辑器中打开，以便对其进行修改。当`git rebase --autosquash`将 "amend!"提交压入`<commit>`时，`<commit>`的日志信息会被 "amend!"提交的精炼日志信息所取代。如果 "修正！"提交的日志信息为空，则是一个错误，除非指定`--allow-empty-message`。

note: type: Plain text
en: `--fixup=reword:<commit>` is shorthand for `--fixup=amend:<commit> --only`. It creates an "amend!" commit with only a log message (ignoring any changes staged in the index). When squashed by `git rebase --autosquash`, it replaces the log message of `<commit>` without making any other changes.
zh_HANS-CN: `--fixup=reword:<commit>`是`--fixup=amend:<commit>--only`的简写。它创建一个只有日志信息的 "修正！"提交（忽略索引中的任何修改）。当被`git rebase --autosquash`压制时，它会替换`<commit>`的日志信息而不做任何其他改动。

note: type: Plain text
en: Neither "fixup!" nor "amend!" commits change authorship of `<commit>` when applied by `git rebase --autosquash`.  See linkgit:git-rebase[1] for details.
zh_HANS-CN: 当被 `git rebase --autosquash` 应用时，"fixup!"和 "amend!"提交都不会改变 `<commit>` 的作者身份。  详情见 linkgit:git-rebase[1]。

note: type: Plain text
en: Construct a commit message for use with `rebase --autosquash`.  The commit message subject line is taken from the specified commit with a prefix of "squash! ".  Can be used with additional commit message options (`-m`/`-c`/`-C`/`-F`). See linkgit:git-rebase[1] for details.
zh_HANS-CN: 构建一条提交信息，供`rebase --autosquash`使用。  提交信息的主题行取自指定的提交，前缀为 "squash!".  可以和其他提交信息选项（`-m`/`-c`/`-C`/`-F`）一起使用。详情见 linkgit:git-rebase[1]。

note: type: Plain text
en: When used with -C/-c/--amend options, or when committing after a conflicting cherry-pick, declare that the authorship of the resulting commit now belongs to the committer. This also renews the author timestamp.
zh_HANS-CN: 当与-C/-c/--amend选项一起使用时，或者当在一个冲突的cherry-pick之后提交时，声明所产生的提交的作者身份现在属于提交者。这也是对作者时间戳的更新。

note: type: Plain text
en: When doing a dry-run, give the output in the short-format. See linkgit:git-status[1] for details. Implies `--dry-run`.
zh_HANS-CN: 当做干运行的时候，以简短的形式给出输出。详见 linkgit:git-status[1]。意味着 `--干运行`。

note: type: Plain text
en: Show the branch and tracking info even in short-format.
zh_HANS-CN: 即使在短文中也要显示分支和跟踪信息。

note: type: Plain text
en: When doing a dry-run, give the output in a porcelain-ready format. See linkgit:git-status[1] for details. Implies `--dry-run`.
zh_HANS-CN: 在做干运行的时候，要把输出结果以可瓷器的格式给出。详见 linkgit:git-status[1]。意味着 `--干运行`。

note: type: Plain text
en: When doing a dry-run, give the output in the long-format.  Implies `--dry-run`.
zh_HANS-CN: 当做干运行时，以长格式给出输出。  意味着"--干运行"。

note: type: Plain text
en: When showing `short` or `porcelain` status output, print the filename verbatim and terminate the entries with NUL, instead of LF.  If no format is given, implies the `--porcelain` output format.  Without the `-z` option, filenames with "unusual" characters are quoted as explained for the configuration variable `core.quotePath` (see linkgit:git-config[1]).
zh_HANS-CN: 当显示 "short "或 "porcelain "状态输出时，逐字打印文件名，用NUL而不是LF来结束条目。  如果没有给出格式，就意味着是`--porcelain`输出格式。  如果没有`-z`选项，带有 "不寻常 "字符的文件名将被引用，正如对配置变量`core.quotePath`的解释（见linkgit:git-config[1]）。

note: type: Plain text
en: Take the commit message from the given file.  Use '-' to read the message from the standard input.
zh_HANS-CN: 从给定文件中获取提交信息。  使用'-'可以从标准输入中读取信息。

note: type: Plain text
en: Override the commit author. Specify an explicit author using the standard `A U Thor <author@example.com>` format. Otherwise <author> is assumed to be a pattern and is used to search for an existing commit by that author (i.e. rev-list --all -i --author=<author>); the commit author is then copied from the first such commit found.
zh_HANS-CN: 覆盖提交者。使用标准的`A U Thor <author@example.com>`格式指定一个明确的作者。否则，<author>将被假定为一个模式，用于搜索该作者的现有提交（即 rev-list --all -i --author=<author>）；然后从找到的第一个此类提交中复制提交作者。

note: type: Plain text
en: Override the author date used in the commit.
zh_HANS-CN: 覆盖提交中使用的作者日期。

note: type: Plain text
en: Use the given <msg> as the commit message.  If multiple `-m` options are given, their values are concatenated as separate paragraphs.
zh_HANS-CN: 使用给定的<msg>作为提交信息。  如果给定了多个`-m`选项，它们的值会作为单独的段落串联起来。

note: type: Plain text
en: The `-m` option is mutually exclusive with `-c`, `-C`, and `-F`.
zh_HANS-CN: m "选项与 "c"、"C "和 "F "相互排斥。

note: type: Plain text
en: When editing the commit message, start the editor with the contents in the given file.  The `commit.template` configuration variable is often used to give this option implicitly to the command.  This mechanism can be used by projects that want to guide participants with some hints on what to write in the message in what order.  If the user exits the editor without editing the message, the commit is aborted.  This has no effect when a message is given by other means, e.g. with the `-m` or `-F` options.
zh_HANS-CN: 编辑提交信息时，以给定文件中的内容启动编辑器。  `commit.template`配置变量经常被用来给命令隐含这个选项。  这个机制可以被那些希望通过一些提示来指导参与者在消息中以何种顺序书写的项目所使用。  如果用户在没有编辑消息的情况下退出编辑器，提交将被中止。  当用其他方式给出消息时，例如用`-m`或`-F`选项时，这没有影响。

note: type: Plain text
en: Specify a (<token>, <value>) pair that should be applied as a trailer. (e.g. `git commit --trailer "Signed-off-by:C O Mitter \ <committer@example.com>" --trailer "Helped-by:C O Mitter \ <committer@example.com>"` will add the "Signed-off-by" trailer and the "Helped-by" trailer to the commit message.)  The `trailer.*` configuration variables (linkgit:git-interpret-trailers[1]) can be used to define if a duplicated trailer is omitted, where in the run of trailers each trailer would appear, and other details.
zh_HANS-CN: 指定一个（<token>, <value>）对，应该作为拖车应用。(例如，`git commit --trailer "Signed-off-by:C O Mitter / <committer@example.com>" --trailer "Helped-by:C O Mitter / <committer@example.com>"`将在提交信息中加入 "Signed-off-by "预告片和 "Helped-by "预告片。)  `trailer.*`配置变量（linkgit:git-interpret-trailers[1]）可以用来定义是否省略重复的拖车，每个拖车会出现在拖车运行的哪个位置，以及其他细节。

note: type: Plain text
en: This option bypasses the pre-commit and commit-msg hooks.  See also linkgit:githooks[5].
zh_HANS-CN: 这个选项绕过了pre-commit和commit-msg钩子。  参见 linkgit:githooks[5]。

note: type: Plain text
en: Usually recording a commit that has the exact same tree as its sole parent commit is a mistake, and the command prevents you from making such a commit.  This option bypasses the safety, and is primarily for use by foreign SCM interface scripts.
zh_HANS-CN: 通常情况下，记录一个与唯一的父级提交的树完全相同的提交是一个错误，该命令会阻止你做出这样的提交。  这个选项绕过了安全问题，主要供国外SCM接口脚本使用。

note: type: Plain text
en: Like --allow-empty this command is primarily for use by foreign SCM interface scripts. It allows you to create a commit with an empty commit message without using plumbing commands like linkgit:git-commit-tree[1].
zh_HANS-CN: 和 --allow-empty 一样，这条命令主要是给国外的 SCM 接口脚本使用的。它允许你在不使用linkgit:git-commit-tree[1]等管道命令的情况下创建一个带有空提交信息的提交。

note: type: Plain text
en: This option determines how the supplied commit message should be cleaned up before committing.  The '<mode>' can be `strip`, `whitespace`, `verbatim`, `scissors` or `default`.
zh_HANS-CN: 这个选项决定了在提交前如何清理所提供的提交信息。  <mode>可以是`strip`、`whitespace`、`verbatim`、`scissors`或`default`。

note: type: Labeled list
en: strip
zh_HANS-CN: 剥离

note: type: Plain text
en: Strip leading and trailing empty lines, trailing whitespace, commentary and collapse consecutive empty lines.
zh_HANS-CN: 剥离前面和后面的空行、后面的空白、注释和折叠的连续空行。

note: type: Plain text
en: Same as `strip` except #commentary is not removed.
zh_HANS-CN: 与 "strip "相同，只是#commentary不被删除。

note: type: Labeled list
en: verbatim
zh_HANS-CN: 逐字逐句

note: type: Plain text
en: Do not change the message at all.
zh_HANS-CN: 完全不要改变信息。

note: type: Plain text
en: Same as `whitespace` except that everything from (and including)  the line found below is truncated, if the message is to be edited.  "`#`" can be customized with core.commentChar.
zh_HANS-CN: 与 "whitespace "相同，但如果要编辑信息，从下面一行开始（包括）的所有内容都被截断。  "`#`"可以用core.commentChar自定义。

note: type: Plain text
en: Same as `strip` if the message is to be edited.  Otherwise `whitespace`.
zh_HANS-CN: 如果要编辑信息，与`strip`相同。  否则就是`whitespace'。

note: type: Plain text
en: The default can be changed by the `commit.cleanup` configuration variable (see linkgit:git-config[1]).
zh_HANS-CN: 默认值可以通过 `commit.cleanup` 配置变量来改变（见linkgit:git-config[1]）。

note: type: Plain text
en: The message taken from file with `-F`, command line with `-m`, and from commit object with `-C` are usually used as the commit log message unmodified. This option lets you further edit the message taken from these sources.
zh_HANS-CN: 用`-F`从文件中获取的信息，用`-m`从命令行中获取的信息，以及用`-C`从提交对象中获取的信息，通常都是未经修改的提交日志信息。这个选项可以让你进一步编辑从这些来源获取的信息。

note: type: Plain text
en: Use the selected commit message without launching an editor.  For example, `git commit --amend --no-edit` amends a commit without changing its commit message.
zh_HANS-CN: 使用选定的提交信息而不启动编辑器。  例如，`git commit --amend --no-edit`修改一个提交，但不改变其提交信息。

note: type: Plain text
en: Replace the tip of the current branch by creating a new commit. The recorded tree is prepared as usual (including the effect of the `-i` and `-o` options and explicit pathspec), and the message from the original commit is used as the starting point, instead of an empty message, when no other message is specified from the command line via options such as `-m`, `-F`, `-c`, etc.  The new commit has the same parents and author as the current one (the `--reset-author` option can countermand this).
zh_HANS-CN: 通过创建一个新的提交来替换当前分支的顶端。记录的树像往常一样准备（包括`-i`和`-o`选项和显式pathspec的效果），当命令行没有通过`-m`、`-F`、`-c`等选项指定其他信息时，原始提交的信息会被用作起点，而不是空信息。  新的提交与当前的提交具有相同的父辈和作者（`--reset-author`选项可以反驳）。

note: type: Plain text
en: It is a rough equivalent for:
zh_HANS-CN: 它是一个粗略的等价物。

note: type: Plain text
en: but can be used to amend a merge commit.
zh_HANS-CN: 但可以用来修改合并提交。

note: type: Plain text
en: You should understand the implications of rewriting history if you amend a commit that has already been published.  (See the "RECOVERING FROM UPSTREAM REBASE" section in linkgit:git-rebase[1].)
zh_HANS-CN: 如果你修改了一个已经发布的提交，你应该明白重写历史的意义。  参见 linkgit:git-rebase[1]中的 "RECOVERING FROM UPSTREAM REBASE" 部分）。

note: type: Plain text
en: Before making a commit out of staged contents so far, stage the contents of paths given on the command line as well.  This is usually not what you want unless you are concluding a conflicted merge.
zh_HANS-CN: 在对迄今为止的暂存内容进行提交之前，对命令行上给出的路径内容也进行暂存。  这通常不是你想要的，除非你正在结束一个冲突的合并。

note: type: Plain text
en: Make a commit by taking the updated working tree contents of the paths specified on the command line, disregarding any contents that have been staged for other paths. This is the default mode of operation of 'git commit' if any paths are given on the command line, in which case this option can be omitted.  If this option is specified together with `--amend`, then no paths need to be specified, which can be used to amend the last commit without committing changes that have already been staged. If used together with `--allow-empty` paths are also not required, and an empty commit will be created.
zh_HANS-CN: 在提交时，只取命令行上指定的工作树的最新内容，而不考虑其他路径上的缓存内容。这是'git commit'的默认操作模式，如果在命令行中给出了任何路径，在这种情况下可以省略该选项。  如果该选项与`--amend`一起指定，则不需要指定路径，可以用来修改最后的提交，而不提交已经被暂存的修改。如果和`--allow-empty`一起使用，也不需要指定路径，将创建一个空的提交。

note: type: Plain text
en: The mode parameter is optional (defaults to 'all'), and is used to specify the handling of untracked files; when -u is not used, the default is 'normal', i.e. show untracked files and directories.
zh_HANS-CN: 模式参数是可选的（默认为 "所有"），用于指定对未追踪文件的处理；当没有使用-u时，默认为 "正常"，即显示未追踪的文件和目录。

note: type: Plain text
en: The possible options are:
zh_HANS-CN: 可能的选择是。

note: type: Plain text
en: 'no'     - Show no untracked files
zh_HANS-CN: 'no' - 不显示未被追踪的文件

note: type: Plain text
en: 'normal' - Shows untracked files and directories
zh_HANS-CN: 'normal' - 显示未被追踪的文件和目录

note: type: Plain text
en: 'all'    - Also shows individual files in untracked directories.
zh_HANS-CN: 'all' - 也显示未被追踪的目录中的单个文件。

note: type: Plain text
en: The default can be changed using the status.showUntrackedFiles configuration variable documented in linkgit:git-config[1].
zh_HANS-CN: 默认值可以用linkgit:git-config[1]中记载的 status.showUntrackedFiles 配置变量来改变。

note: type: Plain text
en: Show unified diff between the HEAD commit and what would be committed at the bottom of the commit message template to help the user describe the commit by reminding what changes the commit has.  Note that this diff output doesn't have its lines prefixed with '#'. This diff will not be a part of the commit message. See the `commit.verbose` configuration variable in linkgit:git-config[1].
zh_HANS-CN: 在提交信息模板的底部显示HEAD提交和将要提交的内容之间的统一差异，通过提醒提交有哪些变化来帮助用户描述提交。  请注意，这个差异输出的行数不会以'#'为前缀。这个差异不会成为提交信息的一部分。参见 linkgit:git-config[1] 中的 `commit.verbose` 配置变量。

note: type: Plain text
en: If specified twice, show in addition the unified diff between what would be committed and the worktree files, i.e. the unstaged changes to tracked files.
zh_HANS-CN: 如果指定了两次，则另外显示将被提交的文件和工作树文件之间的统一差异，即对已跟踪文件的非阶段性修改。

note: type: Plain text
en: Suppress commit summary message.
zh_HANS-CN: 抑制提交摘要信息。

note: type: Plain text
en: Do not create a commit, but show a list of paths that are to be committed, paths with local changes that will be left uncommitted and paths that are untracked.
zh_HANS-CN: 不创建提交，但显示要提交的路径列表，有局部改动的路径将不提交，以及未跟踪的路径。

note: type: Plain text
en: Include the output of linkgit:git-status[1] in the commit message template when using an editor to prepare the commit message.  Defaults to on, but can be used to override configuration variable commit.status.
zh_HANS-CN: 在使用编辑器准备提交信息时，在提交信息模板中包含linkgit:git-status[1]的输出。  默认为开，但可以用来覆盖配置变量commit.status。

note: type: Plain text
en: Do not include the output of linkgit:git-status[1] in the commit message template when using an editor to prepare the default commit message.
zh_HANS-CN: 当使用编辑器准备默认的提交信息时，不要将 linkgit:git-status[1] 的输出包含在提交信息模板中。

note: type: Plain text
en: When pathspec is given on the command line, commit the contents of the files that match the pathspec without recording the changes already added to the index. The contents of these files are also staged for the next commit on top of what have been staged before.
zh_HANS-CN: 当命令行中给出pathspec时，提交符合pathspec的文件内容，而不记录已经添加到索引中的修改。这些文件的内容也会在下一次提交时在之前的文件基础上被暂存。

note: type: Plain text
en: When recording your own work, the contents of modified files in your working tree are temporarily stored to a staging area called the "index" with 'git add'.  A file can be reverted back, only in the index but not in the working tree, to that of the last commit with `git restore --staged <file>`, which effectively reverts 'git add' and prevents the changes to this file from participating in the next commit.  After building the state to be committed incrementally with these commands, `git commit` (without any pathname parameter) is used to record what has been staged so far.  This is the most basic form of the command.  An example:
zh_HANS-CN: 在记录自己的工作时，工作树中修改过的文件的内容会通过'git add'暂时存储到一个叫做 "index "的暂存区域。  一个文件可以用`git restore --staged <file>`恢复到上次提交时的状态，只是在索引中，而不是在工作树中，这实际上是恢复了'git add'，并阻止这个文件的修改参与下一次提交。  在用这些命令建立了要增量提交的状态后，`git commit`（没有任何路径名参数）被用来记录到目前为止已经分阶段提交的内容。  这是该命令最基本的形式。  一个例子。

note: type: Plain text
en: Instead of staging files after each individual change, you can tell `git commit` to notice the changes to the files whose contents are tracked in your working tree and do corresponding `git add` and `git rm` for you.  That is, this example does the same as the earlier example if there is no other change in your working tree:
zh_HANS-CN: 你可以告诉`git commit`注意到工作树中内容被跟踪的文件的变化，并为你做相应的`git add`和`git rm`，而不是在每个单独的变化后暂存文件。  也就是说，如果你的工作树中没有其他变化，这个例子的做法与前面的例子相同。

note: type: Plain text
en: The command `git commit -a` first looks at your working tree, notices that you have modified hello.c and removed goodbye.c, and performs necessary `git add` and `git rm` for you.
zh_HANS-CN: 命令`git commit -a`首先查看你的工作树，注意到你修改了hello.c并删除了goodbye.c，并为你执行必要的`git add`和`git rm`。

note: type: Plain text
en: After staging changes to many files, you can alter the order the changes are recorded in, by giving pathnames to `git commit`.  When pathnames are given, the command makes a commit that only records the changes made to the named paths:
zh_HANS-CN: 在对许多文件进行分期修改后，你可以通过给`git commit`提供路径名来改变修改的顺序。  给出路径名后，该命令就会进行提交，只记录对指定路径的修改。

note: type: Plain text
en: This makes a commit that records the modification to `Makefile`.  The changes staged for `hello.c` and `hello.h` are not included in the resulting commit.  However, their changes are not lost -- they are still staged and merely held back.  After the above sequence, if you do:
zh_HANS-CN: 这将产生一个提交，记录对`Makefile`的修改。  为`hello.c`和`hello.h`所做的修改不包括在这次提交中。  然而，它们的修改并没有丢失 -- 它们仍然被暂存，只是被保留了下来。  在上述顺序之后，如果你做

note: type: Plain text
en: this second commit would record the changes to `hello.c` and `hello.h` as expected.
zh_HANS-CN: 第二次提交会记录下对`hello.c`和`hello.h`的修改，正如预期的那样。

note: type: Plain text
en: After a merge (initiated by 'git merge' or 'git pull') stops because of conflicts, cleanly merged paths are already staged to be committed for you, and paths that conflicted are left in unmerged state.  You would have to first check which paths are conflicting with 'git status' and after fixing them manually in your working tree, you would stage the result as usual with 'git add':
zh_HANS-CN: 在一次合并（由'git merge'或'git pull'发起）因冲突而停止后，干净的合并路径已经被分阶段提交给你了，而发生冲突的路径则被留在未合并状态。  你必须先用'git status'检查哪些路径有冲突，然后在工作树上手动修复它们，再像往常一样用'git add'将结果分阶段。

note: type: Plain text
en: After resolving conflicts and staging the result, `git ls-files -u` would stop mentioning the conflicted path.  When you are done, run `git commit` to finally record the merge:
zh_HANS-CN: 在解决冲突并将结果归档后，`git ls-files -u`将不再提及冲突的路径。  完成后，运行`git commit`来最终记录合并的结果。

note: type: Plain text
en: As with the case to record your own changes, you can use `-a` option to save typing.  One difference is that during a merge resolution, you cannot use `git commit` with pathnames to alter the order the changes are committed, because the merge should be recorded as a single commit.  In fact, the command refuses to run when given pathnames (but see `-i` option).
zh_HANS-CN: 和记录自己的修改的情况一样，你可以使用`-a`选项来节省打字。  有一点不同的是，在解决合并的过程中，你不能使用`git commit`和路径名来改变修改的提交顺序，因为合并应该被记录为一次提交。  事实上，该命令在给定路径名时拒绝运行（但见`-i`选项）。

note: type: Title -
en: COMMIT INFORMATION
zh_HANS-CN: 承诺信息

note: type: Plain text
en: Author and committer information is taken from the following environment variables, if set:
zh_HANS-CN: 作者和提交者的信息取自以下环境变量，如果设置了的话。

note: type: Plain text
en: The author and committer names are by convention some form of a personal name (that is, the name by which other humans refer to you), although Git does not enforce or require any particular form. Arbitrary Unicode may be used, subject to the constraints listed above. This name has no effect on authentication; for that, see the `credential.username` variable in linkgit:git-config[1].
zh_HANS-CN: 作者和提交者的名字按惯例是某种形式的人名（也就是其他人称呼你的名字），尽管Git并不强制或要求任何特定的形式。可以使用任意的Unicode，但要遵守上述的限制。这个名字对认证没有影响；关于这一点，请看linkgit:git-config[1]中的`credential.username`变量。

note: type: Plain text
en: In case (some of) these environment variables are not set, the information is taken from the configuration items `user.name` and `user.email`, or, if not present, the environment variable EMAIL, or, if that is not set, system user name and the hostname used for outgoing mail (taken from `/etc/mailname` and falling back to the fully qualified hostname when that file does not exist).
zh_HANS-CN: 如果这些环境变量（其中一些）没有设置，信息来自配置项`user.name`和`user.email`，或者，如果不存在，环境变量EMAIL，或者，如果没有设置，系统用户名和用于发送邮件的主机名（取自`/etc/mailname`，如果该文件不存在，则返回到完全合格的主机名）。

note: type: Plain text
en: The `author.name` and `committer.name` and their corresponding email options override `user.name` and `user.email` if set and are overridden themselves by the environment variables.
zh_HANS-CN: 如果设置了`author.name`和`committer.name`及其相应的email选项，将覆盖`user.name`和`user.email`，并由环境变量自行覆盖。

note: type: Plain text
en: The typical usage is to set just the `user.name` and `user.email` variables; the other options are provided for more complex use cases.
zh_HANS-CN: 典型的用法是只设置 "user.name "和 "user.email "变量；其他选项是为更复杂的使用情况提供的。

note: type: Plain text
en: Though not required, it's a good idea to begin the commit message with a single short (less than 50 character) line summarizing the change, followed by a blank line and then a more thorough description.  The text up to the first blank line in a commit message is treated as the commit title, and that title is used throughout Git.  For example, linkgit:git-format-patch[1] turns a commit into email, and it uses the title on the Subject line and the rest of the commit in the body.
zh_HANS-CN: 虽然不是必须的，但在提交信息的开头用一行简短（少于50个字符）的文字来概括修改内容是个好主意，接下来是空白行，然后是更详尽的描述。  提交信息中第一个空行之前的文字被视为提交标题，并且该标题在整个 Git 中使用。  例如，linkgit:git-format-patch[1] 把提交变成了电子邮件，它在主题行使用标题，在正文中使用提交的其他内容。

note: type: Title -
en: ENVIRONMENT AND CONFIGURATION VARIABLES
zh_HANS-CN: 环境和配置变量

note: type: Plain text
en: The editor used to edit the commit log message will be chosen from the `GIT_EDITOR` environment variable, the core.editor configuration variable, the `VISUAL` environment variable, or the `EDITOR` environment variable (in that order).  See linkgit:git-var[1] for details.
zh_HANS-CN: 用于编辑提交日志信息的编辑器将从`GIT_EDITOR`环境变量、core.editor配置变量、`VISUAL`环境变量或`EDITOR`环境变量中选择（按顺序）。  详情见linkgit:git-var[1]。

note: type: Plain text
en: This command can run `commit-msg`, `prepare-commit-msg`, `pre-commit`, `post-commit` and `post-rewrite` hooks.  See linkgit:githooks[5] for more information.
zh_HANS-CN: 这个命令可以运行`commit-msg`、`prepare-commit-msg`、`pre-commit`、`post-commit`和`post-rewrite`钩子。  更多信息见linkgit:githooks[5]。

note: type: Labeled list
en: `$GIT_DIR/COMMIT_EDITMSG`
zh_HANS-CN: `$git_dir/commit_editmsg`。

note: type: Plain text
en: This file contains the commit message of a commit in progress.  If `git commit` exits due to an error before creating a commit, any commit message that has been provided by the user (e.g., in an editor session) will be available in this file, but will be overwritten by the next invocation of `git commit`.
zh_HANS-CN: 该文件包含正在进行的提交的提交信息。  如果`git commit`在创建提交前因错误而退出，任何由用户提供的提交信息（例如在编辑器会话中）都会在此文件中出现，但会被下次调用`git commit`时覆盖。

note: type: Plain text
en: SSH:
zh_HANS-CN: {BASH_GNLV3_AMP}

note: type: Plain text
en: git-describe - Give an object a human readable name based on an available ref
zh_HANS-CN: git-describe - 根据一个可用的参考文献，给一个对象起一个人类可读的名字。

note: type: Plain text
en: 'git describe' [--all] [--tags] [--contains] [--abbrev=<n>] [<commit-ish>...]
    'git describe' [--all] [--tags] [--contains] [--abbrev=<n>] --dirty[=<mark>]
    'git describe' <blob>
zh_HANS-CN: 'git describe' [--all] [--tags] [--contains] [--abbrev=<n>] [<commit-ish>...]
    'git describe' [--all] [--tags] [--contains] [--abbrev=<n>] --dirty[=<mark>] 。
    'git describe' <blob

note: type: Plain text
en: The command finds the most recent tag that is reachable from a commit.  If the tag points to the commit, then only the tag is shown.  Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object and the abbreviated object name of the most recent commit. The result is a "human-readable" object name which can also be used to identify the commit to other git commands.
zh_HANS-CN: 该命令找到可从提交中获取的最新标签。  如果标签指向该提交，则只显示该标签。  否则，它会在标签名后面加上附加提交的数量，以及最新提交的缩写对象名。其结果是一个 "人类可读 "的对象名称，也可用于识别其他git命令中的提交。

note: type: Plain text
en: By default (without --all or --tags) `git describe` only shows annotated tags.  For more information about creating annotated tags see the -a and -s options to linkgit:git-tag[1].
zh_HANS-CN: 默认情况下（没有 --all 或 --tags）`git describe`只显示有注释的标签。  关于创建注释标签的更多信息，请参见linkgit:git-tag[1]的-a和-s选项。

note: type: Plain text
en: If the given object refers to a blob, it will be described as `<commit-ish>:<path>`, such that the blob can be found at `<path>` in the `<commit-ish>`, which itself describes the first commit in which this blob occurs in a reverse revision walk from HEAD.
zh_HANS-CN: 如果给定的对象指的是一个blob，它将被描述为`<commit-ish>:<path>`，这样就可以在`<commit-ish>`中的`<path>`找到这个blob，而这个blob本身就描述了从HEAD反向修订中出现的第一个提交。

note: type: Plain text
en: Commit-ish object names to describe.  Defaults to HEAD if omitted.
zh_HANS-CN: 要描述的类似于承诺的对象名称。  如果省略，则默认为HEAD。

note: type: Plain text
en: Describe the state of the working tree.  When the working tree matches HEAD, the output is the same as "git describe HEAD".  If the working tree has local modification "-dirty" is appended to it.  If a repository is corrupt and Git cannot determine if there is local modification, Git will error out, unless `--broken' is given, which appends the suffix "-broken" instead.
zh_HANS-CN: 描述工作树的状态。  当工作树与HEAD匹配时，其输出与 "git describe HEAD "相同。  如果工作树有本地修改，"-dirty "会被附加到它上面。  如果一个仓库被破坏了，而Git不能确定是否有本地修改，Git会出错，除非给了`--broken'，它将附加后缀"-broken"。

note: type: Plain text
en: Instead of using only the annotated tags, use any ref found in `refs/` namespace.  This option enables matching any known branch, remote-tracking branch, or lightweight tag.
zh_HANS-CN: 而不是只使用注释的标签，使用在`refs/`命名空间中发现的任何ref。  这个选项可以匹配任何已知的分支、远程跟踪分支或轻量级标签。

note: type: Plain text
en: Instead of using only the annotated tags, use any tag found in `refs/tags` namespace.  This option enables matching a lightweight (non-annotated) tag.
zh_HANS-CN: 而不是只使用注释过的标签，使用在`refs/tags`命名空间中发现的任何标签。  这个选项可以匹配轻量级（非注释的）标签。

note: type: Plain text
en: Instead of finding the tag that predates the commit, find the tag that comes after the commit, and thus contains it.  Automatically implies --tags.
zh_HANS-CN: 与其寻找提交前的标签，不如寻找提交后的标签，从而包含该标签。  自动暗示--标签。

note: type: Plain text
en: Instead of considering only the 10 most recent tags as candidates to describe the input commit-ish consider up to <n> candidates.  Increasing <n> above 10 will take slightly longer but may produce a more accurate result.  An <n> of 0 will cause only exact matches to be output.
zh_HANS-CN: 与其只考虑用最近的10个标签来描述输入的commit-ish，不如考虑最多<n>个候选人。  将<n>增加到10以上会花费更长的时间，但可能会产生一个更准确的结果。  <n>为0将导致只输出完全匹配的结果。

note: type: Plain text
en: Only output exact matches (a tag directly references the supplied commit).  This is a synonym for --candidates=0.
zh_HANS-CN: 只输出完全匹配的内容（一个标签直接引用所提供的提交）。  这是 --candidates=0 的同义词。

note: type: Plain text
en: Verbosely display information about the searching strategy being employed to standard error.  The tag name will still be printed to standard out.
zh_HANS-CN: 以粗略的方式向标准错误显示正在使用的搜索策略的信息。  标签名称仍将被打印到标准输出。

note: type: Plain text
en: Always output the long format (the tag, the number of commits and the abbreviated commit name) even when it matches a tag.  This is useful when you want to see parts of the commit object name in "describe" output, even when the commit in question happens to be a tagged version.  Instead of just emitting the tag name, it will describe such a commit as v1.2-0-gdeadbee (0th commit since tag v1.2 that points at object deadbee....).
zh_HANS-CN: 总是输出长格式（标签、提交数量和提交名称的缩写），即使它与一个标签相匹配。  当你想在 "describe "输出中看到提交对象的部分名称时，这很有用，即使相关的提交恰好是一个有标签的版本。  它不会只发出标签名称，而是将这样的提交描述为v1.2-0-gdeadbee（标签v1.2后的第0次提交，指向对象deadbee....）。

note: type: Plain text
en: Only consider tags matching the given `glob(7)` pattern, excluding the "refs/tags/" prefix. If used with `--all`, it also considers local branches and remote-tracking references matching the pattern, excluding respectively "refs/heads/" and "refs/remotes/" prefix; references of other types are never considered. If given multiple times, a list of patterns will be accumulated, and tags matching any of the patterns will be considered.  Use `--no-match` to clear and reset the list of patterns.
zh_HANS-CN: 只考虑与给定的 `glob(7)` 模式匹配的标签，不包括 "refs/tags/" 前缀。如果和`--all`一起使用，它也会考虑匹配该模式的本地分支和远程跟踪引用，分别排除 "refs/heads/"和 "refs/remotes/"前缀；其他类型的引用永远不会被考虑。如果给出多次，将积累一个模式列表，匹配任何模式的标签都会被考虑。  使用`--no-match`来清除和重置模式列表。

note: type: Labeled list
en: --exclude <pattern>
zh_HANS-CN: --排除<pattern>。

note: type: Plain text
en: Do not consider tags matching the given `glob(7)` pattern, excluding the "refs/tags/" prefix. If used with `--all`, it also does not consider local branches and remote-tracking references matching the pattern, excluding respectively "refs/heads/" and "refs/remotes/" prefix; references of other types are never considered. If given multiple times, a list of patterns will be accumulated and tags matching any of the patterns will be excluded. When combined with --match a tag will be considered when it matches at least one --match pattern and does not match any of the --exclude patterns. Use `--no-exclude` to clear and reset the list of patterns.
zh_HANS-CN: 不考虑与给定的 `glob(7)` 模式匹配的标签，排除 "refs/tags/"前缀。如果和`--all`一起使用，也不考虑匹配模式的本地分支和远程跟踪引用，分别排除 "refs/heads/"和 "refs/remotes/"前缀；其他类型的引用从不考虑。如果给定多次，将积累一个模式列表，匹配任何模式的标签将被排除。当与--match结合时，当一个标签至少匹配一个--match模式且不匹配任何--exclude模式时，将被考虑。使用`--no-exclude`来清除和重置模式列表。

note: type: Plain text
en: Show uniquely abbreviated commit object as fallback.
zh_HANS-CN: 显示唯一缩写的提交对象作为后备。

note: type: Plain text
en: Follow only the first parent commit upon seeing a merge commit.  This is useful when you wish to not match tags on branches merged in the history of the target commit.
zh_HANS-CN: 在看到合并提交时，只跟随第一个父提交。  当你希望不匹配目标提交历史中合并的分支上的标签时，这很有用。

note: type: Plain text
en: With something like git.git current tree, I get:
zh_HANS-CN: 用git.git当前树这样的东西，我得到了。

note: type: Plain text
en: i.e. the current head of my "parent" branch is based on v1.0.4, but since it has a few commits on top of that, describe has added the number of additional commits ("14") and an abbreviated object name for the commit itself ("2414721")  at the end.
zh_HANS-CN: 也就是说，我的 "父 "分支的当前头部是基于v1.0.4的，但由于它在此基础上有一些提交，所以describe在最后添加了额外的提交数量（"14"）和提交本身的缩写对象名称（"2414721"）。

note: type: Plain text
en: Doing a 'git describe' on a tag-name will just show the tag name:
zh_HANS-CN: 对一个标签名做 "git describe"，只会显示标签名。

note: type: Plain text
en: With --all, the command can use branch heads as references, so the output shows the reference path as well:
zh_HANS-CN: 使用--all，命令可以使用分支头作为参考，所以输出也会显示参考路径。

note: type: Plain text
en: With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:
zh_HANS-CN: 在--abbrev设置为0的情况下，该命令可以用来寻找最接近的没有任何后缀的tagname。

note: type: Plain text
en: Note that the suffix you get if you type these commands today may be longer than what Linus saw above when he ran these commands, as your Git repository may have new commits whose object names begin with 975b that did not exist back then, and "-g975b" suffix alone may not be sufficient to disambiguate these commits.
zh_HANS-CN: 请注意，如果你今天输入这些命令，得到的后缀可能比上面Linus运行这些命令时看到的要长，因为你的Git仓库可能有新的提交，其对象名称以975b开头，而这些提交在当时并不存在，仅靠"-g975b "后缀可能还不足以区分这些提交。

note: type: Title -
en: SEARCH STRATEGY
zh_HANS-CN: 搜索策略

note: type: Plain text
en: For each commit-ish supplied, 'git describe' will first look for a tag which tags exactly that commit.  Annotated tags will always be preferred over lightweight tags, and tags with newer dates will always be preferred over tags with older dates.  If an exact match is found, its name will be output and searching will stop.
zh_HANS-CN: 对于提供的每个提交，'git describe'将首先寻找一个标签，该标签正是该提交的标签。  有注释的标签总是比轻量级的标签更受欢迎，日期较新的标签总是比日期较老的标签更受欢迎。  如果找到一个完全匹配的标签，它的名字就会被输出，搜索就会停止。

note: type: Plain text
en: If an exact match was not found, 'git describe' will walk back through the commit history to locate an ancestor commit which has been tagged.  The ancestor's tag will be output along with an abbreviation of the input commit-ish's SHA-1. If `--first-parent` was specified then the walk will only consider the first parent of each commit.
zh_HANS-CN: 如果没有找到完全匹配的，'git describe'会回溯提交历史，找到一个已经被标记的祖先提交。  该祖先的标签将与输入的提交的SHA-1的缩写一起被输出。如果指定了 `--first-parent`，那么回溯将只考虑每个提交的第一个父级。

note: type: Plain text
en: If multiple tags were found during the walk then the tag which has the fewest commits different from the input commit-ish will be selected and output.  Here fewest commits different is defined as the number of commits which would be shown by `git log tag..input` will be the smallest number of commits possible.
zh_HANS-CN: 如果在行走过程中发现了多个标签，那么将选择与输入的commit-ish相差最少的标签并输出。  这里，最小的提交差异被定义为 "git log tag...input "所显示的提交数量将是最小的提交数量。

note: type: Plain text
en: Tree objects as well as tag objects not pointing at commits, cannot be described.  When describing blobs, the lightweight tags pointing at blobs are ignored, but the blob is still described as <committ-ish>:<path> despite the lightweight tag being favorable.
zh_HANS-CN: 树对象以及不指向提交的标签对象，不能被描述。  在描述blob时，指向blob的轻量级标签会被忽略，但尽管轻量级标签是有利的，blob仍然被描述为<committ-ish>:<path>。

note: type: Labeled list
en: -1 --base
zh_HANS-CN: -1 --基地

note: type: Labeled list
en: <path>...
zh_HANS-CN: <路径>...

note: type: Plain text
en: 'git diff' [<options>] [<commit>] [--] [<path>...]
    'git diff' [<options>] --cached [--merge-base] [<commit>] [--] [<path>...]
    'git diff' [<options>] [--merge-base] <commit> [<commit>...] <commit> [--] [<path>...]
    'git diff' [<options>] <commit>...<commit> [--] [<path>...]
    'git diff' [<options>] <blob> <blob>
    'git diff' [<options>] --no-index [--] <path> <path>
zh_HANS-CN: 'git diff' [<options>] [<commit>] [--] [<path>...]。
    'git diff' [<options>] --cached [--merge-base] [<commit>] [--] [<path>...]。
    'git diff' [<options>] [--merge-base] <commit> [<commit>...] <commit> [--] [<path>...]
    'git diff' [<options>] <commit>...<commit> [--] [<path>...]。
    'git diff' [<options>] <blob> <blob
    'git diff' [<options>] --no-index [--] <path> <path>。

note: type: Plain text
en: Show changes between the working tree and the index or a tree, changes between the index and a tree, changes between two trees, changes resulting from a merge, changes between two blob objects, or changes between two files on disk.
zh_HANS-CN: 显示工作树和索引或树之间的变化，索引和树之间的变化，两个树之间的变化，合并产生的变化，两个blob对象之间的变化，或者磁盘上两个文件之间的变化。

note: type: Labeled list
en: 'git diff' [<options>] [--] [<path>...]
zh_HANS-CN: 'git diff' [<options>] [--] [<path>...] 。

note: type: Plain text
en: This form is to view the changes you made relative to the index (staging area for the next commit).  In other words, the differences are what you _could_ tell Git to further add to the index but you still haven't.  You can stage these changes by using linkgit:git-add[1].
zh_HANS-CN: 这个表格是用来查看你相对于索引（下次提交的暂存区域）所做的修改。  换句话说，这些差异是你_可以告诉 Git 进一步添加到索引中，但你仍然没有。  你可以用linkgit:git-add[1]来对这些改动进行分期。

note: type: Plain text
en: This form is to compare the given two paths on the filesystem.  You can omit the `--no-index` option when running the command in a working tree controlled by Git and at least one of the paths points outside the working tree, or when running the command outside a working tree controlled by Git. This form implies `--exit-code`.
zh_HANS-CN: 这种形式是为了比较文件系统上给定的两个路径。  当在一个由Git控制的工作树中运行该命令，并且至少有一个路径指向工作树之外，或者在一个由Git控制的工作树之外运行该命令时，你可以省略`--no-index`选项。这种形式意味着`--exit-code`。

note: type: Plain text
en: This form is to view the changes you staged for the next commit relative to the named <commit>.  Typically you would want comparison with the latest commit, so if you do not give <commit>, it defaults to HEAD.  If HEAD does not exist (e.g. unborn branches) and <commit> is not given, it shows all staged changes.  --staged is a synonym of --cached.
zh_HANS-CN: 这个表单是用来查看你为下一次提交所做的相对于<commit>的修改。  通常情况下，你希望与最新的提交进行比较，所以如果你没有给出 <commit>，它默认为 HEAD。  如果HEAD不存在（例如未出生的分支），并且没有给出<commit>，它将显示所有已缓存的修改。  -staged是-cached的同义词。

note: type: Plain text
en: This form is to view the changes you have in your working tree relative to the named <commit>.  You can use HEAD to compare it with the latest commit, or a branch name to compare with the tip of a different branch.
zh_HANS-CN: 这个表格是用来查看你的工作树中相对于命名为<commit>的修改。  您可以使用 HEAD 来与最新的提交进行比较，或者使用分支名称来与不同分支的顶端进行比较。

note: type: Plain text
en: If --merge-base is given, instead of using <commit>, use the merge base of <commit> and HEAD.  `git diff --merge-base A` is equivalent to `git diff $(git merge-base A HEAD)`.
zh_HANS-CN: 如果给出了 --merge-base，则不使用<commit>，而使用<commit>和HEAD的合并基数。  `git diff --merge-base A`等同于`git diff $(git merge-base A HEAD)`。

note: type: Plain text
en: This is to view the changes between two arbitrary <commit>.
zh_HANS-CN: 这是为了查看两个任意<commit>之间的变化。

note: type: Plain text
en: If --merge-base is given, use the merge base of the two commits for the "before" side.  `git diff --merge-base A B` is equivalent to `git diff $(git merge-base A B) B`.
zh_HANS-CN: 如果给出了 --merge-base，则使用两个提交的合并基础作为 "之前 "的一方。  `git diff --merge-base A B`等同于`git diff $(git merge-base A B) B`。

note: type: Plain text
en: This form is to view the results of a merge commit.  The first listed <commit> must be the merge itself; the remaining two or more commits should be its parents.  A convenient way to produce the desired set of revisions is to use the `^@` suffix.  For instance, if `master` names a merge commit, `git diff master master^@` gives the same combined diff as `git show master`.
zh_HANS-CN: 这个表单是用来查看合并提交的结果。  第一个列出的<commit>必须是合并本身；其余两个或更多的提交应该是其父辈。  一个方便的方法是使用`^@`后缀来产生所需的修订集。  例如，如果`master`命名了一个合并提交，`git diff master master^@`给出的合并差异与`git show master`相同。

note: type: Plain text
en: This is synonymous to the earlier form (without the `..`) for viewing the changes between two arbitrary <commit>.  If <commit> on one side is omitted, it will have the same effect as using HEAD instead.
zh_HANS-CN: 这与早期的形式（没有`.`）是同义的，用于查看两个任意<commit>之间的变化。  如果省略了一侧的<commit>，将产生与使用HEAD相同的效果。

note: type: Plain text
en: This form is to view the changes on the branch containing and up to the second <commit>, starting at a common ancestor of both <commit>.  `git diff A...B` is equivalent to `git diff $(git merge-base A B) B`.  You can omit any one of <commit>, which has the same effect as using HEAD instead.
zh_HANS-CN: 这种形式是为了查看包含和直到第二个<commit>的分支上的变化，从两个<commit>的共同祖先开始。  `git diff A...B`等同于`git diff $(git merge-base A B) B`。  你可以省略<commit>中的任何一个，这与使用HEAD的效果相同。

note: type: Plain text
en: Just in case you are doing something exotic, it should be noted that all of the <commit> in the above description, except in the `--merge-base` case and in the last two forms that use `..` notations, can be any <tree>.
zh_HANS-CN: 为了防止你做一些奇怪的事情，应该注意到，除了`--merge-base`的情况和最后两种使用`...`符号的形式，上述描述中的所有<commit>都可以是任何<tree>。

note: type: Plain text
en: For a more complete list of ways to spell <commit>, see "SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].  However, "diff" is about comparing two _endpoints_, not ranges, and the range notations (`<commit>..<commit>` and `<commit>...<commit>`) do not mean a range as defined in the "SPECIFYING RANGES" section in linkgit:gitrevisions[7].
zh_HANS-CN: 关于<commit>的更完整的拼写方式，见linkgit:gitrevisions[7]中的 "SPECIFYING REVISIONS "部分。  然而，"diff "是关于比较两个_端点，而不是范围，而且范围符号（`<commit>...<commit>`和`<commit>...<commit>`）并不意味着linkgit:gitrevisions[7]中 "SPECIFYING RANGES "部分所定义的范围。

note: type: Plain text
en: This form is to view the differences between the raw contents of two blob objects.
zh_HANS-CN: 这种形式是为了查看两个blob对象的原始内容之间的差异。

note: type: Plain text
en: Compare the working tree with the "base" version (stage #1), "our branch" (stage #2) or "their branch" (stage #3).  The index contains these stages only for unmerged entries i.e.  while resolving conflicts.  See linkgit:git-read-tree[1] section "3-Way Merge" for detailed information.
zh_HANS-CN: 将工作树与 "基础 "版本（阶段#1）、"我们的分支"（阶段#2）或 "他们的分支"（阶段#3）进行比较。  索引只对未合并的条目包含这些阶段，即在解决冲突时。  详细情况见 linkgit:git-read-tree[1] "3-Way Merge" 部分。

note: type: Plain text
en: Omit diff output for unmerged entries and just show "Unmerged".  Can be used only when comparing the working tree with the index.
zh_HANS-CN: 省略未合并的条目的差异输出，只显示 "Unmerged"。  只能在比较工作树和索引的时候使用。

note: type: Plain text
en: The <paths> parameters, when given, are used to limit the diff to the named paths (you can give directory names and get diff for all files under them).
zh_HANS-CN: <paths>参数，当给出时，用于将diff限制在指定的路径上（你可以给出目录名称，并获得其下所有文件的diff）。

note: type: Labeled list
en: Various ways to check your working tree
zh_HANS-CN: 检查你的工作树的各种方法

note: type: Plain text
en: Changes in the working tree not yet staged for the next commit.
zh_HANS-CN: 工作树上的修改还没有为下一次提交做铺垫。

note: type: Plain text
en: Changes between the index and your last commit; what you would be committing if you run `git commit` without `-a` option.
zh_HANS-CN: 索引和你最后一次提交之间的变化；如果你运行`git commit`而不使用`-a`选项，你将会提交的内容。

note: type: Plain text
en: Changes in the working tree since your last commit; what you would be committing if you run `git commit -a`
zh_HANS-CN: 自你上次提交后工作树上的变化；如果你运行`git commit -a'，你将提交的内容。

note: type: Labeled list
en: Comparing with arbitrary commits
zh_HANS-CN: 与任意提交的比较

note: type: delimited block -
en: $ git diff test            <1>
    $ git diff HEAD -- ./test  <2>
    $ git diff HEAD^ HEAD      <3>
zh_HANS-CN: $ git diff test <1>
    $ git diff HEAD -- ./test <2>
    $ git diff HEAD^ HEAD <3>

note: type: Plain text
en: Instead of using the tip of the current branch, compare with the tip of "test" branch.
zh_HANS-CN: 不使用当前分支的顶端，而是与 "测试 "分支的顶端比较。

note: type: Plain text
en: Instead of comparing with the tip of "test" branch, compare with the tip of the current branch, but limit the comparison to the file "test".
zh_HANS-CN: 与其说是与 "test "分支的顶端比较，不如说是与当前分支的顶端比较，但只限于与 "test "文件比较。

note: type: Plain text
en: Compare the version before the last commit and the last commit.
zh_HANS-CN: 比较上次提交前的版本和上次提交的版本。

note: type: Labeled list
en: Comparing branches
zh_HANS-CN: 比较分支机构

note: type: Plain text
en: Changes between the tips of the topic and the master branches.
zh_HANS-CN: 专题的提示和主分支之间的变化。

note: type: Plain text
en: Changes that occurred on the master branch since when the topic branch was started off it.
zh_HANS-CN: 自专题分支开始以来，在主分支上发生的变化。

note: type: Labeled list
en: Limiting the diff output
zh_HANS-CN: 限制差分输出

note: type: Plain text
en: Show only modification, rename, and copy, but not addition or deletion.
zh_HANS-CN: 只显示修改、重命名和复制，但不显示增加或删除。

note: type: Plain text
en: Show only names and the nature of change, but not actual diff output.
zh_HANS-CN: 只显示名称和变化的性质，但不显示实际的差异输出。

note: type: Plain text
en: Limit diff output to named subtrees.
zh_HANS-CN: 将diff输出限制在命名的子树上。

note: type: Labeled list
en: Munging the diff output
zh_HANS-CN: 轧制差速器输出

note: type: Plain text
en: Spend extra cycles to find renames, copies and complete rewrites (very expensive).
zh_HANS-CN: 花费额外的周期来寻找重命名、复制和完全重写（非常昂贵）。

note: type: Plain text
en: Output diff in reverse.
zh_HANS-CN: 反向输出差值。

note: type: Plain text
en: Support for these types of regular expressions is an optional compile-time dependency. If Git wasn't compiled with support for them providing this option will cause it to die.
zh_HANS-CN: 对这些类型的正则表达式的支持是一个可选的编译时依赖。如果Git在编译时没有对它们的支持，提供这个选项将导致它死亡。

note: type: Plain text
en: the contents of the `$GIT_TEMPLATE_DIR` environment variable;
zh_HANS-CN: `$GIT_TEMPLATE_DIR` 环境变量的内容；

note: type: Plain text
en: git-log - Show commit logs
zh_HANS-CN: git-log - 显示提交日志

note: type: Plain text
en: Shows the commit logs.
zh_HANS-CN: 显示提交日志。

note: type: Plain text
en: The command takes options applicable to the linkgit:git-rev-list[1] command to control what is shown and how, and options applicable to the linkgit:git-diff[1] command to control how the changes each commit introduces are shown.
zh_HANS-CN: 该命令采用适用于 linkgit:git-rev-list[1] 命令的选项来控制显示的内容和方式，以及适用于 linkgit:git-diff[1] 命令的选项来控制每次提交引入的更改的显示方式。

note: type: Plain text
en: Continue listing the history of a file beyond renames (works only for a single file).
zh_HANS-CN: 继续列出一个文件的历史，超过重命名（只对单个文件有效）。

note: type: Labeled list
en: --decorate[=short|full|auto|no]
zh_HANS-CN: --装饰[=短|全|自动|无]

note: type: Plain text
en: If no `--decorate-refs` is given, pretend as if all refs were included.  For each candidate, do not use it for decoration if it matches any patterns given to `--decorate-refs-exclude` or if it doesn't match any of the patterns given to `--decorate-refs`. The `log.excludeDecoration` config option allows excluding refs from the decorations, but an explicit `--decorate-refs` pattern will override a match in `log.excludeDecoration`.
zh_HANS-CN: 如果没有给定`--decorate-refs`，就假装所有的参考文献都被包括在内。  对于每个候选者，如果它与`--decorate-refs-exclude`给出的任何模式相匹配，或者它与`--decorate-refs`给出的任何模式不匹配，就不要将其用于装饰。`log.excludeDecoration`配置选项允许从装饰中排除参考文献，但明确的`--decorate-refs`模式将覆盖`log.excludeDecoration`的匹配。

note: type: Plain text
en: Print out the ref name given on the command line by which each commit was reached.
zh_HANS-CN: 打印出命令行上给出的每一次提交所依据的参考名称。

note: type: Plain text
en: Use mailmap file to map author and committer names and email addresses to canonical real names and email addresses. See linkgit:git-shortlog[1].
zh_HANS-CN: 使用 mailmap 文件将作者和提交者的名字和电子邮件地址映射为规范的真实姓名和电子邮件地址。参见 linkgit:git-shortlog[1]。

note: type: Plain text
en: Without this flag, `git log -p <path>...` shows commits that touch the specified paths, and diffs about the same specified paths.  With this, the full diff is shown for commits that touch the specified paths; this means that "<path>..." limits only commits, and doesn't limit diff for those commits.
zh_HANS-CN: 没有这个标志，`git log -p <path>...`会显示触及指定路径的提交，以及关于相同指定路径的差异。  有了这个，就会显示触及指定路径的提交的全部差异；这意味着"<path>... "只限制提交，而不限制这些提交的差异。

note: type: Plain text
en: Note that this affects all diff-based output types, e.g. those produced by `--stat`, etc.
zh_HANS-CN: 请注意，这将影响所有基于diff的输出类型，例如那些由`--stat`产生的输出。

note: type: Plain text
en: Include a line ``log size <number>'' in the output for each commit, where <number> is the length of that commit's message in bytes.  Intended to speed up tools that read log messages from `git log` output by allowing them to allocate space in advance.
zh_HANS-CN: 在每次提交的输出中包括一行"`日志大小<number>'"，其中<number>是该提交信息的长度，单位为字节。  旨在加快从`git log`输出中读取日志信息的工具的速度，允许它们提前分配空间。

note: type: Labeled list
en: <revision range>
zh_HANS-CN: <修订版范围>。

note: type: Plain text
en: Show only commits in the specified revision range.  When no <revision range> is specified, it defaults to `HEAD` (i.e. the whole history leading to the current commit).  `origin..HEAD` specifies all the commits reachable from the current commit (i.e. `HEAD`), but not from `origin`. For a complete list of ways to spell <revision range>, see the 'Specifying Ranges' section of linkgit:gitrevisions[7].
zh_HANS-CN: 只显示指定修订范围内的提交。  当没有指定<修订范围>时，默认为`HEAD`（即导致当前提交的整个历史）。  `origin...HEAD`指定从当前提交（即`HEAD`）开始的所有提交，但不是从`origin`开始。关于<revision range>的完整拼写方式，请参见linkgit:gitrevisions[7]的 "指定范围 "部分。

note: type: Labeled list
en: [--] <path>...
zh_HANS-CN: [--] <路径>...

note: type: Plain text
en: Show only commits that are enough to explain how the files that match the specified paths came to be.  See 'History Simplification' below for details and other simplification modes.
zh_HANS-CN: 只显示那些足以解释符合指定路径的文件是如何形成的提交。  有关细节和其他简化模式，请参见下面的'历史简化'。

note: type: Plain text
en: Paths may need to be prefixed with `--` to separate them from options or the revision range, when confusion arises.
zh_HANS-CN: 当出现混淆时，路径可能需要以`--`为前缀，以便将其与选项或修订范围分开。

note: type: Title -
en: DIFF FORMATTING
zh_HANS-CN: 差异格式化

note: type: Plain text
en: By default, `git log` does not generate any diff output. The options below can be used to show the changes made by each commit.
zh_HANS-CN: 默认情况下，`git log`不会产生任何差异输出。下面的选项可以用来显示每次提交所做的修改。

note: type: Plain text
en: Note that unless one of `--diff-merges` variants (including short `-m`, `-c`, and `--cc` options) is explicitly given, merge commits will not show a diff, even if a diff format like `--patch` is selected, nor will they match search options like `-S`. The exception is when `--first-parent` is in use, in which case `first-parent` is the default format.
zh_HANS-CN: 注意，除非明确给出`--diff-merges`的变体（包括短的`-m`，`-c`和`-cc`选项），否则合并提交不会显示差异，即使选择了`--patch`这样的差异格式，也不会匹配`-S`这样的搜索选项。例外情况是当`--first-parent`被使用时，在这种情况下，`first-parent`是默认格式。

note: type: Labeled list
en: `git log --no-merges`
zh_HANS-CN: `git log --no-merges`。

note: type: Plain text
en: Show the whole commit history, but skip any merges
zh_HANS-CN: 显示整个提交历史，但跳过任何合并内容

note: type: Plain text
en: Show all commits since version 'v2.6.12' that changed any file in the `include/scsi` or `drivers/scsi` subdirectories
zh_HANS-CN: 显示自版本'v2.6.12'以来改变`include/scsi`或`drivers/scsi`子目录中任何文件的所有提交。

note: type: Labeled list
en: `git log --since="2 weeks ago" -- gitk`
zh_HANS-CN: `git log --since="2 weeks ago" -- gitk`。

note: type: Plain text
en: Show the changes during the last two weeks to the file 'gitk'.  The `--` is necessary to avoid confusion with the *branch* named 'gitk'
zh_HANS-CN: 显示过去两周内对文件'gitk'的修改。  `--`是必要的，以避免与名为'gitk'的*分支相混淆。

note: type: Plain text
en: Show the commits that are in the "test" branch but not yet in the "release" branch, along with the list of paths each commit modifies.
zh_HANS-CN: 显示在 "test "分支中但尚未在 "release "分支中的提交，以及每个提交修改的路径列表。

note: type: Labeled list
en: `git log --follow builtin/rev-list.c`
zh_HANS-CN: `git log --follow builtin/rev-list.c`。

note: type: Plain text
en: Shows the commits that changed `builtin/rev-list.c`, including those commits that occurred before the file was given its present name.
zh_HANS-CN: 显示改变`builtin/rev-list.c`的提交，包括那些在文件被赋予现在名字之前发生的提交。

note: type: Labeled list
en: `git log --branches --not --remotes=origin`
zh_HANS-CN: `git log --branches --not --remotes=origin`。

note: type: Plain text
en: Shows all commits that are in any of local branches but not in any of remote-tracking branches for 'origin' (what you have that origin doesn't).
zh_HANS-CN: 显示所有在本地分支中但不在 "origin "的远程跟踪分支中的提交（你有而origin没有的东西）。

note: type: Labeled list
en: `git log master --not --remotes=*/master`
zh_HANS-CN: `git log master --not --remotes=*/master`。

note: type: Plain text
en: Shows all commits that are in local master but not in any remote repository master branches.
zh_HANS-CN: 显示所有在本地主库但不在任何远程仓库主库分支中的提交。

note: type: Labeled list
en: `git log -p -m --first-parent`
zh_HANS-CN: `git log -p -m -first-parent`。

note: type: Plain text
en: Shows the history including change diffs, but only from the ``main branch'' perspective, skipping commits that come from merged branches, and showing full diffs of changes introduced by the merges.  This makes sense only when following a strict policy of merging all topic branches when staying on a single integration branch.
zh_HANS-CN: 显示包括变化差异的历史，但只从 "主分支 "的角度，跳过来自合并分支的提交，并显示合并带来的全部变化差异。  这只有在遵循严格的政策，在停留在一个集成分支时合并所有主题分支时才有意义。

note: type: Labeled list
en: `git log -L '/int main/',/^}/:main.c`
zh_HANS-CN: `git log -L '/int main/',/^}/:main.c`。

note: type: Plain text
en: Shows how the function `main()` in the file `main.c` evolved over time.
zh_HANS-CN: 显示了文件`main.c`中的函数`main()`是如何随时间演变的。

note: type: Plain text
en: Limits the number of commits to show to 3.
zh_HANS-CN: 将显示的提交数量限制在3个。

note: type: Plain text
en: See linkgit:git-config[1] for core variables and linkgit:git-diff[1] for settings related to diff generation.
zh_HANS-CN: 核心变量见 linkgit:git-config[1] ，与 diff 生成相关的设置见 linkgit:git-diff[1] 。

note: type: Plain text
en: Default for the `--format` option.  (See 'Pretty Formats' above.)  Defaults to `medium`.
zh_HANS-CN: `--format`选项的默认值。  (见上面的 "漂亮的格式"。)默认为 "中等"。

note: type: Plain text
en: Encoding to use when displaying logs.  (See 'Discussion' above.)  Defaults to the value of `i18n.commitEncoding` if set, and UTF-8 otherwise.
zh_HANS-CN: 显示日志时要使用的编码。  (见上面的 "讨论"。)如果设置了，默认为`i18n.commitEncoding`的值，否则为UTF-8。

note: type: Plain text
en: Default format for human-readable dates.  (Compare the `--date` option.)  Defaults to "default", which means to write dates like `Sat May 8 19:35:34 2010 -0500`.
zh_HANS-CN: 人类可读日期的默认格式。  (比较`--date`选项。)默认为 "default"，即写成`Sat May 8 19:35:34 2010 -0500`这样的日期。

note: type: Plain text
en: If the format is set to "auto:foo" and the pager is in use, format "foo" will be the used for the date format. Otherwise "default" will be used.
zh_HANS-CN: 如果格式被设置为 "auto:foo"，并且正在使用呼叫器，那么格式 "foo "将被用于日期格式。否则将使用 "默认"。

note: type: Plain text
en: If `true`, `git log` will act as if the `--follow` option was used when a single <path> is given.  This has the same limitations as `--follow`, i.e. it cannot be used to follow multiple files and does not work well on non-linear history.
zh_HANS-CN: 如果`true`，`git log`将像使用`--follow`选项一样，当给出一个<路径>时。  这与`--follow`有相同的限制，即它不能用于跟踪多个文件，并且在非线性历史上不能很好地工作。

note: type: Plain text
en: If `false`, `git log` and related commands will not treat the initial commit as a big creation event.  Any root commits in `git log -p` output would be shown without a diff attached.  The default is `true`.
zh_HANS-CN: 如果`false`，`git log`和相关命令将不把初始提交作为一个大的创建事件。  `git log -p`输出中的任何根提交都会被显示出来，而不附加差异。  默认是`true`。

note: type: Plain text
en: If `true`, `git log` and related commands will act as if the `--show-signature` option was passed to them.
zh_HANS-CN: 如果 "true"，"git log "和相关命令将像"--显示签名 "选项一样行事。

note: type: Labeled list
en: notes.displayRef
zh_HANS-CN: 笔记.displayRef

note: type: Plain text
en: Which refs, in addition to the default set by `core.notesRef` or `GIT_NOTES_REF`, to read notes from when showing commit messages with the `log` family of commands.  See linkgit:git-notes[1].
zh_HANS-CN: 除了由`core.notesRef`或`GIT_NOTES_REF`设置的默认值外，在用`log`系列命令显示提交信息时，还要从哪些参考文献中读取注释。  参见linkgit:git-notes[1]。

note: type: Plain text
en: May be an unabbreviated ref name or a glob and may be specified multiple times.  A warning will be issued for refs that do not exist, but a glob that does not match any refs is silently ignored.
zh_HANS-CN: 可以是一个非缩写的 ref 名称或一个 glob，并且可以多次指定。  对于不存在的参考文献将发出警告，但不匹配任何参考文献的glob将被沉默地忽略。

note: type: Plain text
en: This setting can be disabled by the `--no-notes` option, overridden by the `GIT_NOTES_DISPLAY_REF` environment variable, and overridden by the `--notes=<ref>` option.
zh_HANS-CN: 这个设置可以由`--no-notes`选项禁用，由`GIT_NOTES_DISPLAY_REF`环境变量覆盖，并由`--notes=<ref>`选项覆盖。

note: type: Plain text
en: git-mv - Move or rename a file, a directory, or a symlink
zh_HANS-CN: git-mv - 移动或重命名一个文件、一个目录或一个符号链接

note: type: Plain text
en: 'git mv' <options>... <args>...
zh_HANS-CN: 'git mv' <options>...<args>...

note: type: Plain text
en: Move or rename a file, directory or symlink.
zh_HANS-CN: 移动或重命名一个文件、目录或符号链接。

note: type: Plain text
en:  git mv [-v] [-f] [-n] [-k] <source> <destination>
     git mv [-v] [-f] [-n] [-k] <source> ... <destination directory>
zh_HANS-CN:  git mv [-v] [-f] [-n] [-k] <来源> <目的地>。
     git mv [-v] [-f] [-n] [-k] <source> ...<目的地>目录

note: type: Plain text
en: In the first form, it renames <source>, which must exist and be either a file, symlink or directory, to <destination>.  In the second form, the last argument has to be an existing directory; the given sources will be moved into this directory.
zh_HANS-CN: 在第一种形式中，它将<source>重命名为<destination>，它必须存在并且是一个文件、符号链接或目录。  在第二种形式中，最后一个参数必须是一个现有的目录；给定的源将被移到这个目录中。

note: type: Plain text
en: The index is updated after successful completion, but the change must still be committed.
zh_HANS-CN: 索引在成功完成后被更新，但变化仍必须被提交。

note: type: Plain text
en: Force renaming or moving of a file even if the target exists
zh_HANS-CN: 强制重命名或移动一个文件，即使目标存在。

note: type: Plain text
en: Skip move or rename actions which would lead to an error condition. An error happens when a source is neither existing nor controlled by Git, or when it would overwrite an existing file unless `-f` is given.
zh_HANS-CN: 跳过会导致错误情况的移动或重命名操作。当一个源文件既不存在也不被Git控制，或者它将覆盖一个现有的文件时，就会发生错误，除非给出`-f`。

note: type: Plain text
en: Do nothing; only show what would happen
zh_HANS-CN: 什么都不做；只显示会发生什么

note: type: Plain text
en: Report the names of files as they are moved.
zh_HANS-CN: 当文件被移动时，报告它们的名称。

note: type: Plain text
en: Moving a submodule using a gitfile (which means they were cloned with a Git version 1.7.8 or newer) will update the gitfile and core.worktree setting to make the submodule work in the new location.  It also will attempt to update the submodule.<name>.path setting in the linkgit:gitmodules[5] file and stage that file (unless -n is used).
zh_HANS-CN: 使用 gitfile 移动一个子模块（这意味着它们是用 1.7.8 或更新的 Git 版本克隆的）将更新 gitfile 和 core.worktree 设置以使子模块在新的位置工作。  它也会尝试更新linkgit:gitmodules[5]文件中的submodule.<name>.path设置，并将该文件放入舞台（除非使用-n）。

note: type: Plain text
en: Each time a superproject update moves a populated submodule (e.g. when switching between commits before and after the move) a stale submodule checkout will remain in the old location and an empty directory will appear in the new location. To populate the submodule again in the new location the user will have to run "git submodule update" afterwards. Removing the old directory is only safe when it uses a gitfile, as otherwise the history of the submodule will be deleted too. Both steps will be obsolete when recursive submodule update has been implemented.
zh_HANS-CN: 每次超级项目更新移动一个已填充的子模块（例如，当在移动前后的提交之间切换时），一个陈旧的子模块检出将保留在旧的位置，一个空目录将出现在新的位置。要在新的位置再次填充子模块，用户将不得不在之后运行 "git submodule update"。移除舊目錄只有在使用 gitfile 時才是安全的，否則子模塊的歷史也會被刪除。当递归子模块更新被实施后，这两个步骤将被淘汰。

note: type: Plain text
en: 'git notes' [list [<object>]]
    'git notes' add [-f] [--allow-empty] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
    'git notes' copy [-f] ( --stdin | <from-object> [<to-object>] )
    'git notes' append [--allow-empty] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
    'git notes' edit [--allow-empty] [<object>]
    'git notes' show [<object>]
    'git notes' merge [-v | -q] [-s <strategy> ] <notes-ref>
    'git notes' merge --commit [-v | -q]
    'git notes' merge --abort [-v | -q]
    'git notes' remove [--ignore-missing] [--stdin] [<object>...]
    'git notes' prune [-n] [-v]
    'git notes' get-ref
zh_HANS-CN: 'git notes' [list [<object>]]
    'git notes' add [-f] [--allow-empty] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>] 。
    'git notes' copy [-f] ( --stdin | <from-object> [<to-object>] )
    'git notes' append [--allow-empty] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
    'git notes' edit [--allow-empty] [<object>])
    'git notes' 显示 [<object>]
    'git notes' merge [-v | -q] [-s <strategy> ] <notes-ref>
    'git notes' merge --commit [-v | -q]
    'git notes' merge --abort [-v | -q]
    'git notes' remove [--ignore-missing] [--stdin] [<object>...]。
    'git notes' prune [-n] [-v]
    'git notes' get-ref

note: type: Plain text
en: Adds, removes, or reads notes attached to objects, without touching the objects themselves.
zh_HANS-CN: 添加、删除或读取附在物体上的注释，而不接触物体本身。

note: type: Plain text
en: By default, notes are saved to and read from `refs/notes/commits`, but this default can be overridden.  See the OPTIONS, CONFIGURATION, and ENVIRONMENT sections below.  If this ref does not exist, it will be quietly created when it is first needed to store a note.
zh_HANS-CN: 默认情况下，笔记被保存到`refs/notes/commits`并从那里读取，但这个默认值可以被覆盖。  参见下面的OPTIONS, CONFIGURATION和ENVIRONMENT部分。  如果这个参考文献不存在，当它第一次需要存储笔记时，它将被悄悄地创建。

note: type: Plain text
en: A typical use of notes is to supplement a commit message without changing the commit itself. Notes can be shown by 'git log' along with the original commit message. To distinguish these notes from the message stored in the commit object, the notes are indented like the message, after an unindented line saying "Notes (<refname>):" (or "Notes:" for `refs/notes/commits`).
zh_HANS-CN: 注释的一个典型用途是在不改变提交本身的情况下补充提交信息。注释可以通过 "git log "与原始提交信息一起显示。为了将这些注释与保存在提交对象中的消息区分开来，注释会像消息一样缩进，在未缩进的一行后面写上 "注释（<参考名称>）："（或 "注释："用于`参考/注释/提交`）。

note: type: Plain text
en: Notes can also be added to patches prepared with `git format-patch` by using the `--notes` option. Such notes are added as a patch commentary after a three dash separator line.
zh_HANS-CN: 注释也可以通过使用`git format-patch`选项添加到补丁中，`--notes`。这样的注释会作为补丁注释添加在三个破折号的分隔线之后。

note: type: Plain text
en: To change which notes are shown by 'git log', see the "notes.displayRef" configuration in linkgit:git-log[1].
zh_HANS-CN: 要改变 "git log "所显示的笔记，请看 linkgit:git-log[1] 中的 "notes.displayRef "配置。

note: type: Plain text
en: See the "notes.rewrite.<command>" configuration for a way to carry notes across commands that rewrite commits.
zh_HANS-CN: 参见 "notes.rewrite.<command>"配置，以了解在重写提交的命令中携带笔记的方法。

note: type: Title -
en: SUBCOMMANDS
zh_HANS-CN: 次级单位

note: type: Plain text
en: List the notes object for a given object. If no object is given, show a list of all note objects and the objects they annotate (in the format "<note object> <annotated object>").  This is the default subcommand if no subcommand is given.
zh_HANS-CN: 列出给定对象的注释对象。如果没有给定对象，则显示所有注解对象及其注解的对象的列表（格式为"<注解对象><注解对象>"）。  如果没有给出子命令，这是默认的子命令。

note: type: Plain text
en: Add notes for a given object (defaults to HEAD). Abort if the object already has notes (use `-f` to overwrite existing notes).  However, if you're using `add` interactively (using an editor to supply the notes contents), then - instead of aborting - the existing notes will be opened in the editor (like the `edit` subcommand).
zh_HANS-CN: 为一个给定的对象添加注释（默认为HEAD）。如果该对象已经有了注释，则放弃（使用`-f`覆盖现有的注释）。  然而，如果你正在交互式地使用`add`（使用编辑器提供注释内容），那么--而不是中止--现有的注释将在编辑器中打开（像`edit`子命令）。

note: type: Plain text
en: Copy the notes for the first object onto the second object (defaults to HEAD). Abort if the second object already has notes, or if the first object has none (use -f to overwrite existing notes to the second object). This subcommand is equivalent to: `git notes add [-f] -C $(git notes list <from-object>) <to-object>`
zh_HANS-CN: 将第一个对象的注释复制到第二个对象上（默认为HEAD）。如果第二个对象已经有注解，或者第一个对象没有注解，则放弃（使用-f将现有注解覆盖到第二个对象）。这个子命令等同于。`git notes add [-f] -C $(git notes list <from-object>) <to-object>`。

note: type: Plain text
en: In `--stdin` mode, take lines in the format
zh_HANS-CN: 在`--stdin`模式下，采取格式为

note: type: Plain text
en: on standard input, and copy the notes from each <from-object> to its corresponding <to-object>.  (The optional `<rest>` is ignored so that the command can read the input given to the `post-rewrite` hook.)
zh_HANS-CN: 在标准输入中，将每个<from-object>中的注释复制到相应的<to-object>中。（可选的`<rest>`被忽略，以便命令可以读取给`post-rewrite`钩的输入）。

note: type: Plain text
en: Append to the notes of an existing object (defaults to HEAD).  Creates a new notes object if needed.
zh_HANS-CN: 附加到一个现有对象的注释中（默认为HEAD）。  如果需要的话，会创建一个新的注释对象。

note: type: Plain text
en: Edit the notes for a given object (defaults to HEAD).
zh_HANS-CN: 编辑一个给定对象的注释（默认为HEAD）。

note: type: Plain text
en: Show the notes for a given object (defaults to HEAD).
zh_HANS-CN: 显示一个给定对象的注释（默认为HEAD）。

note: type: Plain text
en: Merge the given notes ref into the current notes ref.  This will try to merge the changes made by the given notes ref (called "remote") since the merge-base (if any) into the current notes ref (called "local").
zh_HANS-CN: 将给定的注释参考文献合并到当前的注释参考文献中。  这将尝试把给定的注释（称为 "远程"）自合并基础（如果有的话）以来所做的修改合并到当前的注释（称为 "本地"）。

note: type: Plain text
en: If conflicts arise and a strategy for automatically resolving conflicting notes (see the "NOTES MERGE STRATEGIES" section) is not given, the "manual" resolver is used. This resolver checks out the conflicting notes in a special worktree (`.git/NOTES_MERGE_WORKTREE`), and instructs the user to manually resolve the conflicts there.  When done, the user can either finalize the merge with 'git notes merge --commit', or abort the merge with 'git notes merge --abort'.
zh_HANS-CN: 如果出现冲突，并且没有给出自动解决冲突笔记的策略（见 "NOTES MERGE STRATEGIES "一节），就会使用 "手动 "解决器。这个解决方法在一个特殊的工作树（`.git/NOTES_MERGE_WORKTREE`）中检查出冲突的笔记，并指示用户手动解决那里的冲突。  完成后，用户可以用 "git notes merge --commit "最终完成合并，或者用 "git notes merge --abort "中止合并。

note: type: Plain text
en: Remove the notes for given objects (defaults to HEAD). When giving zero or one object from the command line, this is equivalent to specifying an empty note message to the `edit` subcommand.
zh_HANS-CN: 删除给定对象的注释（默认为HEAD）。当从命令行给出零或一个对象时，这相当于给`edit`子命令指定一个空的注释信息。

note: type: Plain text
en: Remove all notes for non-existing/unreachable objects.
zh_HANS-CN: 删除所有不存在/无法到达的对象的注释。

note: type: Plain text
en: Print the current notes ref. This provides an easy way to retrieve the current notes ref (e.g. from scripts).
zh_HANS-CN: 打印当前的注释参考。这提供了一个简单的方法来检索当前的笔记参考文献（例如从脚本中）。

note: type: Plain text
en: When adding notes to an object that already has notes, overwrite the existing notes (instead of aborting).
zh_HANS-CN: 当向一个已经有注释的对象添加注释时，覆盖现有的注释（而不是中止）。

note: type: Plain text
en: Use the given note message (instead of prompting).  If multiple `-m` options are given, their values are concatenated as separate paragraphs.  Lines starting with `#` and empty lines other than a single line between paragraphs will be stripped out.
zh_HANS-CN: 使用给定的注释信息（而不是提示）。  如果给定了多个`-m`选项，它们的值将作为单独的段落串联起来。  以`#`开头的行和段落之间的单行以外的空行将被剥离出来。

note: type: Plain text
en: Take the note message from the given file.  Use '-' to read the note message from the standard input.  Lines starting with `#` and empty lines other than a single line between paragraphs will be stripped out.
zh_HANS-CN: 从给定的文件中获取注释信息。  使用'-'可以从标准输入中读取注释信息。  以 "#"开头的行和段落之间的单行以外的空行将被剥离出来。

note: type: Labeled list
en: -C <object>
zh_HANS-CN: -C <对象>

note: type: Plain text
en: Take the given blob object (for example, another note) as the note message. (Use `git notes copy <object>` instead to copy notes between objects.)
zh_HANS-CN: 将给定的blob对象（例如，另一个笔记）作为笔记信息。(使用`git notes copy <object>`来代替在对象之间复制注释)。

note: type: Labeled list
en: -c <object>
zh_HANS-CN: -c <对象>

note: type: Plain text
en: Like '-C', but with `-c` the editor is invoked, so that the user can further edit the note message.
zh_HANS-CN: 像'-C'一样，但有了`-c'就会调用编辑器，这样用户就可以进一步编辑注释信息。

note: type: Plain text
en: Allow an empty note object to be stored. The default behavior is to automatically remove empty notes.
zh_HANS-CN: 允许存储一个空的笔记对象。默认行为是自动删除空笔记。

note: type: Plain text
en: Manipulate the notes tree in <ref>.  This overrides `GIT_NOTES_REF` and the "core.notesRef" configuration.  The ref specifies 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.
zh_HANS-CN: 操纵<ref>中的笔记树。  这覆盖了`GIT_NOTES_REF`和 "core.notesRef "配置。  当Ref以`refs/notes/`开始时，指定完整的Ref名称；当它以`notes/`开始时，`refs/`，否则`refs/notes/`前缀，形成Ref的全名。

note: type: Plain text
en: Do not consider it an error to request removing notes from an object that does not have notes attached to it.
zh_HANS-CN: 不要认为请求从一个没有附加注释的对象上删除注释是一个错误。

note: type: Plain text
en: Also read the object names to remove notes from the standard input (there is no reason you cannot combine this with object names from the command line).
zh_HANS-CN: 还可以从标准输入中读取对象名称来删除注释（你没有理由不把它与命令行的对象名称结合起来）。

note: type: Plain text
en: Do not remove anything; just report the object names whose notes would be removed.
zh_HANS-CN: 不要删除任何东西；只是报告其注释将被删除的对象名称。

note: type: Plain text
en: When merging notes, resolve notes conflicts using the given strategy. The following strategies are recognized: "manual" (default), "ours", "theirs", "union" and "cat_sort_uniq".  This option overrides the "notes.mergeStrategy" configuration setting.  See the "NOTES MERGE STRATEGIES" section below for more information on each notes merge strategy.
zh_HANS-CN: 合并笔记时，使用给定的策略解决笔记冲突。以下策略是被认可的。"手动"（默认）、"我们的"、"他们的"、"联合 "和 "cat_sort_uniq"。  这个选项覆盖了 "notes.mergeStrategy "的配置设置。  关于每种笔记合并策略的更多信息，请看下面的 "笔记合并策略 "部分。

note: type: Plain text
en: Finalize an in-progress 'git notes merge'. Use this option when you have resolved the conflicts that 'git notes merge' stored in .git/NOTES_MERGE_WORKTREE. This amends the partial merge commit created by 'git notes merge' (stored in .git/NOTES_MERGE_PARTIAL) by adding the notes in .git/NOTES_MERGE_WORKTREE. The notes ref stored in the .git/NOTES_MERGE_REF symref is updated to the resulting commit.
zh_HANS-CN: 最终确定一个正在进行的'git notes merge'。当您解决了'git notes merge'存储在.git/NOTES_MERGE_WORKTREE中的冲突后，使用此选项。这将修正由'git notes merge'创建的部分合并提交（存储在.git/NOTES_MERGE_PARTIAL中），加入.git/NOTES_MERGE_WORKTREE中的注释。存储在 .git/NOTES_MERGE_REF 符号参考中的注释会被更新到结果提交中。

note: type: Plain text
en: Abort/reset an in-progress 'git notes merge', i.e. a notes merge with conflicts. This simply removes all files related to the notes merge.
zh_HANS-CN: 中止/重置正在进行的 "git笔记合并"，即有冲突的笔记合并。这只是删除了所有与笔记合并有关的文件。

note: type: Plain text
en: When merging notes, operate quietly.
zh_HANS-CN: 合并笔记时，要安静地操作。

note: type: Plain text
en: When merging notes, be more verbose.  When pruning notes, report all object names whose notes are removed.
zh_HANS-CN: 当合并笔记时，要更加详细。  当修剪注释时，报告所有被删除注释的对象名称。

note: type: Plain text
en: Commit notes are blobs containing extra information about an object (usually information to supplement a commit's message).  These blobs are taken from notes refs.  A notes ref is usually a branch which contains "files" whose paths are the object names for the objects they describe, with some directory separators included for performance reasons footnote:[Permitted pathnames have the form 'bf'`/`'fe'`/`'30'`/`'...'`/`'680d5a...': a sequence of directory names of two hexadecimal digits each followed by a filename with the rest of the object ID.].
zh_HANS-CN: 提交注释是包含关于一个对象的额外信息（通常是补充提交信息的信息）的 blobs。  这些blobs取自注释参考。  一个注释参考通常是一个包含 "文件 "的分支，这些文件的路径是它们所描述的对象的名称，出于性能的考虑，还包括一些目录分隔符 footnote:[允许的路径名有'bf'`/`'fe'`/`'30'`/`'...`/`'680d5a...'的形式：一串由两个十六进制数字组成的目录名，后面是一个带有其余对象ID的文件名。]

note: type: Plain text
en: Every notes change creates a new commit at the specified notes ref.  You can therefore inspect the history of the notes by invoking, e.g., `git log -p notes/commits`.  Currently the commit message only records which operation triggered the update, and the commit authorship is determined according to the usual rules (see linkgit:git-commit[1]).  These details may change in the future.
zh_HANS-CN: 每一个笔记的变化都会在指定的笔记参考号上创建一个新的提交。  因此，你可以通过调用，例如，`git log -p notes/commits`，来检查笔记的历史。  目前，提交信息只记录了哪个操作触发了更新，而提交者的身份则根据通常的规则确定（见 linkgit:git-commit[1]）。  这些细节在未来可能会发生变化。

note: type: Plain text
en: It is also permitted for a notes ref to point directly to a tree object, in which case the history of the notes can be read with `git log -p -g <refname>`.
zh_HANS-CN: 也允许注释直接指向树状对象，在这种情况下，可以用`git log -p -g <refname>`读取注释的历史。

note: type: Title -
en: NOTES MERGE STRATEGIES
zh_HANS-CN: 注释 合并策略

note: type: Plain text
en: The default notes merge strategy is "manual", which checks out conflicting notes in a special work tree for resolving notes conflicts (`.git/NOTES_MERGE_WORKTREE`), and instructs the user to resolve the conflicts in that work tree.  When done, the user can either finalize the merge with 'git notes merge --commit', or abort the merge with 'git notes merge --abort'.
zh_HANS-CN: 默认的笔记合并策略是 "手动"，它在一个用于解决笔记冲突的特殊工作树（`.git/NOTES_MERGE_WORKTREE`）中检查出冲突的笔记，并指示用户在该工作树中解决冲突。  完成后，用户可以用 "git notes merge --commit "最终完成合并，或者用 "git notes merge --abort "中止合并。

note: type: Plain text
en: Users may select an automated merge strategy from among the following using either -s/--strategy option or configuring notes.mergeStrategy accordingly:
zh_HANS-CN: 用户可以使用-s/--strategy选项或相应地配置notes.mergeStrategy，从以下内容中选择一个自动合并策略。

note: type: Plain text
en: "ours" automatically resolves conflicting notes in favor of the local version (i.e. the current notes ref).
zh_HANS-CN: "我们的 "自动解决冲突的注释，支持本地版本（即当前的注释参考）。

note: type: Plain text
en: "theirs" automatically resolves notes conflicts in favor of the remote version (i.e. the given notes ref being merged into the current notes ref).
zh_HANS-CN: "他们的 "自动解决笔记冲突，有利于远程版本（即给定的笔记参考文献被合并到当前的笔记参考文献中）。

note: type: Plain text
en: "union" automatically resolves notes conflicts by concatenating the local and remote versions.
zh_HANS-CN: "union "通过串联本地和远程版本自动解决注释冲突。

note: type: Plain text
en: "cat_sort_uniq" is similar to "union", but in addition to concatenating the local and remote versions, this strategy also sorts the resulting lines, and removes duplicate lines from the result. This is equivalent to applying the "cat | sort | uniq" shell pipeline to the local and remote versions. This strategy is useful if the notes follow a line-based format where one wants to avoid duplicated lines in the merge result.  Note that if either the local or remote version contain duplicate lines prior to the merge, these will also be removed by this notes merge strategy.
zh_HANS-CN: "cat_sort_uniq "与 "union "类似，但除了连接本地和远程版本之外，这个策略还对结果行进行排序，并从结果中删除重复的行。这相当于对本地和远程版本应用 "cat | sort | uniq "shell流水线。如果笔记是基于行的格式，希望在合并结果中避免重复的行，那么这个策略就很有用。  请注意，如果本地或远程版本在合并前包含重复的行，这些行也会被这个笔记合并策略所删除。

note: type: Plain text
en: You can use notes to add annotations with information that was not available at the time a commit was written.
zh_HANS-CN: 你可以使用注释来添加提交时无法获得的信息的注释。

note: type: delimited block -
en: Notes:
        Tested-by: Johannes Sixt <j6t@kdbg.org>
zh_HANS-CN: 注意事项。
        测试者： Johannes Sixt <j6t@kdbg.org>

note: type: Plain text
en: In principle, a note is a regular Git blob, and any kind of (non-)format is accepted.  You can binary-safely create notes from arbitrary files using 'git hash-object':
zh_HANS-CN: 原则上，笔记是一个普通的Git blob，任何种类的（非）格式都可以接受。  你可以使用 "git hash-object "从任意文件中二进制安全地创建注释。

note: type: Plain text
en: (You cannot simply use `git notes --ref=built add -F a.out HEAD` because that is not binary-safe.)  Of course, it doesn't make much sense to display non-text-format notes with 'git log', so if you use such notes, you'll probably need to write some special-purpose tools to do something useful with them.
zh_HANS-CN: (你不能简单地使用`git notes --ref=built add -F a.out HEAD`，因为这不是二进制安全的。)  当然，用'git log'来显示非文本格式的笔记没有什么意义，所以如果你使用这样的笔记，你可能需要写一些特殊用途的工具来对它们做一些有用的事情。

note: type: Plain text
en: Notes ref to read and manipulate instead of `refs/notes/commits`.  Must be an unabbreviated ref name.  This setting can be overridden through the environment and command line.
zh_HANS-CN: 读取和操作的注释，而不是`refs/notes/commits`。  必须是一个不简略的参考文献名称。  这个设置可以通过环境和命令行来覆盖。

note: type: Labeled list
en: notes.mergeStrategy
zh_HANS-CN: 笔记.合并策略

note: type: Plain text
en: Which merge strategy to choose by default when resolving notes conflicts.  Must be one of `manual`, `ours`, `theirs`, `union`, or `cat_sort_uniq`.  Defaults to `manual`.  See "NOTES MERGE STRATEGIES" section above for more information on each strategy.
zh_HANS-CN: 在解决笔记冲突时，默认选择哪种合并策略。  必须是`manual`, `ours`, `theirs`, `union`, 或 `cat_sort_uniq`之一。  默认为 "手动"。  关于每种策略的更多信息，请看上面的 "Notes MERGE STRATEGIES "部分。

note: type: Plain text
en: This setting can be overridden by passing the `--strategy` option.
zh_HANS-CN: 这个设置可以通过传递`--策略`选项来覆盖。

note: type: Labeled list
en: notes.<name>.mergeStrategy
zh_HANS-CN: 笔记.<名称>.合并策略

note: type: Plain text
en: Which merge strategy to choose when doing a notes merge into refs/notes/<name>.  This overrides the more general "notes.mergeStrategy".  See the "NOTES MERGE STRATEGIES" section above for more information on each available strategy.
zh_HANS-CN: 当进行笔记合并到 refs/notes/<name>时，选择哪种合并策略。  这覆盖了更一般的 "notes.mergeStrategy"。  关于每个可用策略的更多信息，请参见上面的 "笔记合并策略 "部分。

note: type: Plain text
en: Which ref (or refs, if a glob or specified more than once), in addition to the default set by `core.notesRef` or `GIT_NOTES_REF`, to read notes from when showing commit messages with the 'git log' family of commands.  This setting can be overridden on the command line or by the `GIT_NOTES_DISPLAY_REF` environment variable.  See linkgit:git-log[1].
zh_HANS-CN: 除了`core.notesRef`或`GIT_NOTES_REF`设置的默认值外，在用'git log'系列命令显示提交信息时，还要从哪个参考文献（或参考文献，如果一个glob或指定多个）中读取。  这个设置可以在命令行或`GIT_NOTES_DISPLAY_REF`环境变量中被覆盖。  参见 linkgit:git-log[1]。

note: type: Labeled list
en: notes.rewrite.<command>
zh_HANS-CN: 笔记.重写.<命令>

note: type: Plain text
en: When rewriting commits with <command> (currently `amend` or `rebase`), if this variable is `false`, git will not copy notes from the original to the rewritten commit.  Defaults to `true`.  See also "`notes.rewriteRef`" below.
zh_HANS-CN: 当用<command>重写提交时（目前是`amend`或`rebase`），如果这个变量是`false`，git将不会从原始提交中复制注释到重写的提交中。  默认为`true`。  参见下面的"`notes.rewriteRef`"。

note: type: Plain text
en: This setting can be overridden by the `GIT_NOTES_REWRITE_REF` environment variable.
zh_HANS-CN: 这个设置可以被`GIT_NOTES_REWRITE_REF`环境变量所覆盖。

note: type: Labeled list
en: notes.rewriteMode
zh_HANS-CN: 笔记.重写模式

note: type: Plain text
en: When copying notes during a rewrite, what to do if the target commit already has a note.  Must be one of `overwrite`, `concatenate`, `cat_sort_uniq`, or `ignore`.  Defaults to `concatenate`.
zh_HANS-CN: 在重写过程中复制注释时，如果目标提交已经有一个注释，该如何处理。  必须是`overwrite`, `concatenate`, `cat_sort_uniq`, 或 `ignore`之一。  默认为 "concatenate"。

note: type: Plain text
en: This setting can be overridden with the `GIT_NOTES_REWRITE_MODE` environment variable.
zh_HANS-CN: 这个设置可以用`GIT_NOTES_REWRITE_MODE`环境变量覆盖。

note: type: Labeled list
en: notes.rewriteRef
zh_HANS-CN: 笔记.重写参考

note: type: Plain text
en: When copying notes during a rewrite, specifies the (fully qualified) ref whose notes should be copied.  May be a glob, in which case notes in all matching refs will be copied.  You may also specify this configuration several times.
zh_HANS-CN: 当在重写过程中复制注释时，指定应该被复制的（完全合格的）注释。  可以是一个glob，在这种情况下，所有匹配的参考文献中的注释都会被复制。  你也可以多次指定这个配置。

note: type: Plain text
en: Does not have a default value; you must configure this variable to enable note rewriting.
zh_HANS-CN: 没有默认值；你必须配置这个变量以启用注释重写。

note: type: Plain text
en: Can be overridden with the `GIT_NOTES_REWRITE_REF` environment variable.
zh_HANS-CN: 可以用`GIT_NOTES_REWRITE_REF`环境变量覆盖。

note: type: Plain text
en: Which ref to manipulate notes from, instead of `refs/notes/commits`.  This overrides the `core.notesRef` setting.
zh_HANS-CN: 从哪个参考文献来操作笔记，而不是`refs/notes/commits`。  这覆盖了`core.notesRef'的设置。

note: type: Plain text
en: Colon-delimited list of refs or globs indicating which refs, in addition to the default from `core.notesRef` or `GIT_NOTES_REF`, to read notes from when showing commit messages.  This overrides the `notes.displayRef` setting.
zh_HANS-CN: 以冒号为界的参考文献或globs列表，表示除了默认的`core.notesRef`或`GIT_NOTES_REF`之外，在显示提交信息时要从哪些参考文献读取。  这取代了`notes.displayRef`的设置。

note: type: Plain text
en: A warning will be issued for refs that do not exist, but a glob that does not match any refs is silently ignored.
zh_HANS-CN: 对于不存在的 refs 将会发出警告，但是不匹配任何 refs 的 glob 会被默默地忽略。

note: type: Plain text
en: When copying notes during a rewrite, what to do if the target commit already has a note.  Must be one of `overwrite`, `concatenate`, `cat_sort_uniq`, or `ignore`.  This overrides the `core.rewriteMode` setting.
zh_HANS-CN: 在重写过程中复制注释时，如果目标提交已经有一个注释，该如何处理。  必须是`overwrite`, `concatenate`, `cat_sort_uniq`, 或 `ignore`之一。  这覆盖了`core.rewriteMode`的设置。

note: type: Plain text
en: When rewriting commits, which notes to copy from the original to the rewritten commit.  Must be a colon-delimited list of refs or globs.
zh_HANS-CN: 当重写提交时，要从原始提交中复制哪些注释到重写的提交中。  必须是一个以冒号分隔的 refs 或 globs 列表。

note: type: Plain text
en: If not set in the environment, the list of notes to copy depends on the `notes.rewrite.<command>` and `notes.rewriteRef` settings.
zh_HANS-CN: 如果环境中没有设置，要复制的笔记列表取决于`notes.rewrite.<command>`和`notes.rewriteRef`设置。

note: type: Labeled list
en: --missing=<missing-action>
zh_HANS-CN: --missing=<missing-action>（缺失）。

note: type: Plain text
en: A debug option to help with future "partial clone" development.  This option specifies how missing objects are handled.
zh_HANS-CN: 一个调试选项，帮助未来的 "部分克隆 "开发。  这个选项指定了如何处理丢失的对象。

note: type: Plain text
en: In the first three forms, copy entries from `<tree-ish>` to the index.  In the last form, set the current branch head (`HEAD`) to `<commit>`, optionally modifying index and working tree to match.  The `<tree-ish>`/`<commit>` defaults to `HEAD` in all forms.
zh_HANS-CN: 在前三种形式中，从`<treeish>`复制条目到索引。  在最后一个表格中，将当前的分支头(`HEAD`)设置为`<commit>`，可以选择修改索引和工作树来匹配。  `<tree-ish>`/`<commit>`在所有表格中默认为`HEAD`。

note: type: Plain text
en: These forms reset the index entries for all paths that match the `<pathspec>` to their state at `<tree-ish>`.  (It does not affect the working tree or the current branch.)
zh_HANS-CN: 这些表格将所有符合`<pathspec>`的路径的索引项重置为`<treeish>`时的状态。  (它不影响工作树或当前分支)。

note: type: Plain text
en: This means that `git reset <pathspec>` is the opposite of `git add <pathspec>`. This command is equivalent to `git restore [--source=<tree-ish>] --staged <pathspec>...`.
zh_HANS-CN: 这意味着，`git reset <pathspec>`与`git add <pathspec>`相反。该命令等同于`git restore [--source=<treeish>] --staged <pathspec>...`。

note: type: Plain text
en: After running `git reset <pathspec>` to update the index entry, you can use linkgit:git-restore[1] to check the contents out of the index to the working tree. Alternatively, using linkgit:git-restore[1] and specifying a commit with `--source`, you can copy the contents of a path out of a commit to the index and to the working tree in one go.
zh_HANS-CN: 运行 `git reset <pathspec>` 来更新索引条目后，您可以使用 linkgit:git-restore[1] 来检查索引中的内容到工作树上。另外，使用 linkgit:git-restore[1] 并用 `--source` 指定一个提交，你可以一次性将一个路径的内容从提交中复制到索引和工作树上。

note: type: Plain text
en: Interactively select hunks in the difference between the index and `<tree-ish>` (defaults to `HEAD`).  The chosen hunks are applied in reverse to the index.
zh_HANS-CN: 在索引和`<tree-ish>`（默认为`HEAD`）之间的差异中交互式地选择猎物。  选择的猎物将被反向应用到索引中。

note: type: Plain text
en: This means that `git reset -p` is the opposite of `git add -p`, i.e.  you can use it to selectively reset hunks. See the ``Interactive Mode'' section of linkgit:git-add[1] to learn how to operate the `--patch` mode.
zh_HANS-CN: 这意味着 `git reset -p` 与 `git add -p` 相反，也就是说，你可以用它来有选择地重置 hunks。参见 linkgit:git-add[1] 的 ``互动模式''部分，了解如何操作`--patch`模式。

note: type: Plain text
en: This form resets the current branch head to `<commit>` and possibly updates the index (resetting it to the tree of `<commit>`) and the working tree depending on `<mode>`. If `<mode>` is omitted, defaults to `--mixed`. The `<mode>` must be one of the following:
zh_HANS-CN: 这种形式将当前分支头重设为`<commit>`，并可能更新索引（重设为`<commit>`的树）和工作树，具体取决于`<mode>`。如果省略了`<mode>`，默认为`--mixed`。`<mode>`必须是下列之一。

note: type: Plain text
en: Does not touch the index file or the working tree at all (but resets the head to `<commit>`, just like all modes do). This leaves all your changed files "Changes to be committed", as `git status` would put it.
zh_HANS-CN: 完全不碰索引文件或工作树（但将头部重置为`<commit>`，就像所有模式一样）。这使你的所有更改的文件都是 "待提交的更改"，正如`git status`所说的。

note: type: Plain text
en: Resets the index but not the working tree (i.e., the changed files are preserved but not marked for commit) and reports what has not been updated. This is the default action.
zh_HANS-CN: 重置索引，但不重置工作树（即保留已修改的文件，但不标记为提交）并报告未更新的内容。这是默认动作。

note: type: Plain text
en: Resets the index and updates the files in the working tree that are different between `<commit>` and `HEAD`, but keeps those which are different between the index and working tree (i.e. which have changes which have not been added).  If a file that is different between `<commit>` and the index has unstaged changes, reset is aborted.
zh_HANS-CN: 重置索引并更新工作树中在`<commit>`和`HEAD`之间不同的文件，但保留那些在索引和工作树之间不同的文件（即那些有未被添加的修改）。  如果一个在`<commit>`和索引之间不同的文件有未分阶段的变化，重置将被中止。

note: type: Plain text
en: In other words, `--merge` does something like a `git read-tree -u -m <commit>`, but carries forward unmerged index entries.
zh_HANS-CN: 换句话说，`--merge`做的是类似于`git read-tree -u -m <commit>`的事情，但会转发未合并的索引条目。

note: type: Plain text
en: Resets index entries and updates files in the working tree that are different between `<commit>` and `HEAD`.  If a file that is different between `<commit>` and `HEAD` has local changes, reset is aborted.
zh_HANS-CN: 重置索引项并更新工作树中`<commit>`和`HEAD`之间不同的文件。  如果一个在`<commit>`和`HEAD`之间不同的文件有本地修改，重置将被中止。

note: type: Plain text
en: When the working tree is updated, using --recurse-submodules will also recursively reset the working tree of all active submodules according to the commit recorded in the superproject, also setting the submodules' HEAD to be detached at that commit.
zh_HANS-CN: 当工作树被更新时，使用 --recurse-submodules 也将根据超级项目中记录的提交，递归地重置所有活动的子模块的工作树，同时也将子模块的 HEAD 设置为在该提交中被分离。

note: type: Plain text
en: See "Reset, restore and revert" in linkgit:git[1] for the differences between the three commands.
zh_HANS-CN: 关于这三个命令的区别，见linkgit:git[1]中的 "重置、恢复和还原"。

note: type: Plain text
en: Be quiet, only report errors. The default behavior is set by the `reset.quiet` config option. `--quiet` and `--no-quiet` will override the default behavior.
zh_HANS-CN: 保持安静，只报告错误。默认行为是由`reset.quiet`配置选项设置的。`--quiet`和`--no-quiet`将覆盖默认行为。

note: type: Labeled list
en: Undo add
zh_HANS-CN: 撤销添加

note: type: Plain text
en: You are happily working on something, and find the changes in these files are in good order.  You do not want to see them when you run `git diff`, because you plan to work on other files and changes with these files are distracting.
zh_HANS-CN: 你正在愉快地工作，发现这些文件中的修改都很有秩序。  你不希望在运行`git diff'时看到它们，因为你打算在其他文件上工作，而这些文件的变化会让你分心。

note: type: Plain text
en: Somebody asks you to pull, and the changes sound worthy of merging.
zh_HANS-CN: 有人要求你拉，而且这些变化听起来值得合并。

note: type: Plain text
en: However, you already dirtied the index (i.e. your index does not match the `HEAD` commit).  But you know the pull you are going to make does not affect `frotz.c` or `filfre.c`, so you revert the index changes for these two files.  Your changes in working tree remain there.
zh_HANS-CN: 然而，你已经破坏了索引（也就是说，你的索引与`HEAD`提交不匹配）。  但你知道你要做的拉动并不影响`frotz.c`或`filfre.c`，所以你恢复了这两个文件的索引修改。  你在工作树上的修改仍然存在。

note: type: Plain text
en: Then you can pull and merge, leaving `frotz.c` and `filfre.c` changes still in the working tree.
zh_HANS-CN: 然后你可以拉出并合并，留下`frotz.c`和`filfre.c`的修改仍在工作树上。

note: type: Labeled list
en: Undo a commit and redo
zh_HANS-CN: 撤销一个提交并重做

note: type: Plain text
en: This is most often done when you remembered what you just committed is incomplete, or you misspelled your commit message, or both.  Leaves working tree as it was before "reset".
zh_HANS-CN: 这通常是在你记得你刚提交的内容不完整，或者你的提交信息拼错了，或者两者都是。  留下工作树在 "重置 "之前的样子。

note: type: Plain text
en: Make corrections to working tree files.
zh_HANS-CN: 对工作树文件进行修正。

note: type: Plain text
en: "reset" copies the old head to `.git/ORIG_HEAD`; redo the commit by starting with its log message.  If you do not need to edit the message further, you can give `-C` option instead.
zh_HANS-CN: "reset "将旧的头部复制到`.git/ORIG_HEAD`；从其日志信息开始重做提交。  如果你不需要进一步编辑信息，你可以给`-C`选项代替。

note: type: Plain text
en: See also the `--amend` option to linkgit:git-commit[1].
zh_HANS-CN: 参见linkgit:git-commit[1]的`--amend`选项。

note: type: Labeled list
en: Undo a commit, making it a topic branch
zh_HANS-CN: 撤销一个提交，使其成为一个主题分支

note: type: Plain text
en: You have made some commits, but realize they were premature to be in the `master` branch.  You want to continue polishing them in a topic branch, so create `topic/wip` branch off of the current `HEAD`.
zh_HANS-CN: 你已经做了一些提交，但意识到它们在 "master "分支中还不成熟。  你想在一个主题分支中继续完善它们，所以在当前的`HEAD'之外创建了`topic/wip'分支。

note: type: Plain text
en: Rewind the master branch to get rid of those three commits.
zh_HANS-CN: 回溯主分支，去掉这三个提交。

note: type: Plain text
en: Switch to `topic/wip` branch and keep working.
zh_HANS-CN: 切换到`topic/wip`分支并继续工作。

note: type: Labeled list
en: Undo commits permanently
zh_HANS-CN: 永久撤销提交

note: type: delimited block -
en: $ git commit ...
    $ git reset --hard HEAD~3   <1>
zh_HANS-CN: $ git commit ...
    $ git reset --hard HEAD~3 <1>

note: type: Plain text
en: The last three commits (`HEAD`, `HEAD^`, and `HEAD~2`) were bad and you do not want to ever see them again.  Do *not* do this if you have already given these commits to somebody else.  (See the "RECOVERING FROM UPSTREAM REBASE" section in linkgit:git-rebase[1] for the implications of doing so.)
zh_HANS-CN: 最后三个提交（`HEAD`，`HEAD^`，和`HEAD~2`）是坏的，你不希望再看到它们。  如果你已经把这些提交给了别人，请不要**这样做。  参见 linkgit:git-rebase[1] 中的 "RECOVERING FROM UPSTREAM REBASE" 一节，了解这样做的意义）。

note: type: Labeled list
en: Undo a merge or pull
zh_HANS-CN: 撤销合并或拉动

note: type: delimited block -
en: $ git pull                         <1>
    Auto-merging nitfol
    CONFLICT (content): Merge conflict in nitfol
    Automatic merge failed; fix conflicts and then commit the result.
    $ git reset --hard                 <2>
    $ git pull . topic/branch          <3>
    Updating from 41223... to 13134...
    Fast-forward
    $ git reset --hard ORIG_HEAD       <4>
zh_HANS-CN: $ git pull <1>
    自动合并nitfol
    CONFLICT（内容）。nitfol的合并冲突
    自动合并失败；修复冲突，然后提交结果。
    $ git reset --hard <2>
    $ git pull . topic/branch <3>
    从41223...更新到13134...
    快进
    $ git reset --hard ORIG_HEAD <4>

note: type: Plain text
en: Try to update from the upstream resulted in a lot of conflicts; you were not ready to spend a lot of time merging right now, so you decide to do that later.
zh_HANS-CN: 试图从上游更新导致了很多冲突；你现在还没有准备好花费大量的时间来合并，所以你决定以后再做这个。

note: type: Plain text
en: "pull" has not made merge commit, so `git reset --hard` which is a synonym for `git reset --hard HEAD` clears the mess from the index file and the working tree.
zh_HANS-CN: "pull "没有进行合并提交，所以`git reset --hard`是`git reset --hard HEAD`的同义词，它清除了索引文件和工作树上的混乱。

note: type: Plain text
en: Merge a topic branch into the current branch, which resulted in a fast-forward.
zh_HANS-CN: 将一个主题分支合并到当前分支，这导致了快进。

note: type: Plain text
en: But you decided that the topic branch is not ready for public consumption yet.  "pull" or "merge" always leaves the original tip of the current branch in `ORIG_HEAD`, so resetting hard to it brings your index file and the working tree back to that state, and resets the tip of the branch to that commit.
zh_HANS-CN: 但你决定这个主题分支还不适合公开使用。  "pull "或 "merge "总是在`ORIG_HEAD`中留下当前分支的原始提示，所以硬重置到它会使你的索引文件和工作树回到那个状态，并将分支的提示重置到那个提交。

note: type: Labeled list
en: Undo a merge or pull inside a dirty working tree
zh_HANS-CN: 撤消合并或拉动肮脏的工作树的行为

note: type: Plain text
en: Even if you may have local modifications in your working tree, you can safely say `git pull` when you know that the change in the other branch does not overlap with them.
zh_HANS-CN: 即使你的工作树中可能有局部的修改，当你知道另一个分支中的修改没有与之重叠时，你可以放心地说`git pull`。

note: type: Plain text
en: After inspecting the result of the merge, you may find that the change in the other branch is unsatisfactory.  Running `git reset --hard ORIG_HEAD` will let you go back to where you were, but it will discard your local changes, which you do not want.  `git reset --merge` keeps your local changes.
zh_HANS-CN: 在检查了合并的结果后，你可能会发现另一个分支的修改不尽人意。  运行`git reset --hard ORIG_HEAD`可以让你回到原来的位置，但它会丢弃你的本地修改，这是你不想要的。  `git reset --merge`会保留你的本地修改。

note: type: Labeled list
en: Interrupted workflow
zh_HANS-CN: 中断的工作流程

note: type: Plain text
en: Suppose you are interrupted by an urgent fix request while you are in the middle of a large change.  The files in your working tree are not in any shape to be committed yet, but you need to get to the other branch for a quick bugfix.
zh_HANS-CN: 假设你在做一个大的改动时被一个紧急的修复请求打断了。  你工作树上的文件还没到可以提交的地步，但你需要到另一个分支去快速修复错误。

note: type: delimited block -
en: $ git switch feature  ;# you were working in "feature" branch and
    $ work work work      ;# got interrupted
    $ git commit -a -m "snapshot WIP"                 <1>
    $ git switch master
    $ fix fix fix
    $ git commit ;# commit with real log
    $ git switch feature
    $ git reset --soft HEAD^ ;# go back to WIP state  <2>
    $ git reset                                       <3>
zh_HANS-CN: $ git switch feature ;# 你在 "feature "分支工作，并且
    $ work work work;# 被打断了
    $ git commit -a -m "snapshot WIP" <1
    $ git switch master
    $ fix fix fix
    $ git commit ;# 提交时有真实日志
    $ git switch feature
    $ git reset --soft HEAD^ ;# 回到 WIP 状态 <2>
    $ git reset <3>

note: type: Plain text
en: This commit will get blown away so a throw-away log message is OK.
zh_HANS-CN: 这个提交会被吹走，所以扔掉的日志信息是可以的。

note: type: Plain text
en: This removes the 'WIP' commit from the commit history, and sets your working tree to the state just before you made that snapshot.
zh_HANS-CN: 这将从提交历史中删除 "WIP "提交，并将你的工作树设置为刚刚做出快照之前的状态。

note: type: Plain text
en: At this point the index file still has all the WIP changes you committed as 'snapshot WIP'.  This updates the index to show your WIP files as uncommitted.
zh_HANS-CN: 在这一点上，索引文件仍然有你提交的所有WIP修改，作为 "快照WIP"。  这样就可以更新索引，将你的WIP文件显示为未提交的。

note: type: Plain text
en: See also linkgit:git-stash[1].
zh_HANS-CN: 也请参见 linkgit:git-stash[1]。

note: type: Labeled list
en: Reset a single file in the index
zh_HANS-CN: 重置索引中的单个文件

note: type: Plain text
en: Suppose you have added a file to your index, but later decide you do not want to add it to your commit. You can remove the file from the index while keeping your changes with git reset.
zh_HANS-CN: 假设你在索引中添加了一个文件，但后来决定不想把它加入你的提交中。你可以用git reset将该文件从索引中删除，同时保留你的修改。

note: type: delimited block -
en: $ git reset -- frotz.c                      <1>
    $ git commit -m "Commit files in index"     <2>
    $ git add frotz.c                           <3>
zh_HANS-CN: $ git reset -- frotz.c <1>.
    $ git commit -m "将文件存入索引" <2>
    $ git add frotz.c <3>

note: type: Plain text
en: This removes the file from the index while keeping it in the working directory.
zh_HANS-CN: 这将从索引中删除该文件，同时将其保留在工作目录中。

note: type: Plain text
en: This commits all other changes in the index.
zh_HANS-CN: 这将提交索引中的所有其他变化。

note: type: Plain text
en: Adds the file to the index again.
zh_HANS-CN: 再次将该文件添加到索引中。

note: type: Labeled list
en: Keep changes in working tree while discarding some previous commits
zh_HANS-CN: 在工作树中保留修改，同时丢弃一些以前的提交内容

note: type: Plain text
en: Suppose you are working on something and you commit it, and then you continue working a bit more, but now you think that what you have in your working tree should be in another branch that has nothing to do with what you committed previously. You can start a new branch and reset it while keeping the changes in your working tree.
zh_HANS-CN: 假设你正在做某件事，并提交了它，然后你又继续做了一会儿，但现在你认为你工作树中的内容应该在另一个分支中，而这个分支与你之前提交的内容毫无关系。你可以启动一个新的分支，并重置它，同时保留工作树中的变化。

note: type: Plain text
en: This commits your first edits in `branch1`.
zh_HANS-CN: 这将提交你在 `branch1`中的第一次编辑。

note: type: Plain text
en: In the ideal world, you could have realized that the earlier commit did not belong to the new topic when you created and switched to `branch2` (i.e. `git switch -c branch2 start`), but nobody is perfect.
zh_HANS-CN: 在理想的世界里，你可以在创建并切换到 "分支2"（即 "git switch -c branch2 start"）时意识到先前的提交不属于新主题，但人无完人。

note: type: Plain text
en: But you can use `reset --keep` to remove the unwanted commit after you switched to `branch2`.
zh_HANS-CN: 但你可以用`reset --keep`来删除你切换到`branch2`后不需要的提交。

note: type: Labeled list
en: Split a commit apart into a sequence of commits
zh_HANS-CN: 将一个提交分割成一连串的提交

note: type: Plain text
en: Suppose that you have created lots of logically separate changes and committed them together. Then, later you decide that it might be better to have each logical chunk associated with its own commit. You can use git reset to rewind history without changing the contents of your local files, and then successively use `git add -p` to interactively select which hunks to include into each commit, using `git commit -c` to pre-populate the commit message.
zh_HANS-CN: 假设你创建了很多逻辑上独立的修改，并将它们一起提交。然后，后来你决定让每个逻辑块与自己的提交相关联可能更好。你可以使用 git reset 来回溯历史，而不改变本地文件的内容，然后连续使用 `git add -p` 来交互式地选择哪些块包含在每个提交中，使用 `git commit -c` 来预先填入提交信息。

note: type: delimited block -
en: $ git reset -N HEAD^                        <1>
    $ git add -p                                <2>
    $ git diff --cached                         <3>
    $ git commit -c HEAD@{1}                    <4>
    ...                                         <5>
    $ git add ...                               <6>
    $ git diff --cached                         <7>
    $ git commit ...                            <8>
zh_HANS-CN: $ git reset -N HEAD^ <1>
    $ git add -p <2>
    $ git diff --cached <3>
    $ git commit -c HEAD@{1}.                    <4>
    ...                                         <5>
    $ git add ...                               <6>
    $ git diff --cached <7>
    $ git commit ...                            <8>

note: type: Plain text
en: First, reset the history back one commit so that we remove the original commit, but leave the working tree with all the changes. The -N ensures that any new files added with `HEAD` are still marked so that `git add -p` will find them.
zh_HANS-CN: 首先，将历史记录向后重设一次提交，这样我们就删除了原始提交，但保留了工作树上的所有修改。N确保任何用`HEAD`添加的新文件仍然被标记，以便`git add -p`能够找到它们。

note: type: Plain text
en: Next, we interactively select diff hunks to add using the `git add -p` facility. This will ask you about each diff hunk in sequence and you can use simple commands such as "yes, include this", "No don't include this" or even the very powerful "edit" facility.
zh_HANS-CN: 接下来，我们使用 "git add -p "工具，交互式地选择要添加的diff hunks。这将依次询问每个差异块，你可以使用简单的命令，如 "是，包括这个"，"不，不包括这个"，甚至是非常强大的 "编辑 "工具。

note: type: Plain text
en: Once satisfied with the hunks you want to include, you should verify what has been prepared for the first commit by using `git diff --cached`. This shows all the changes that have been moved into the index and are about to be committed.
zh_HANS-CN: 一旦对你想要包括的hunks感到满意，你应该通过使用`git diff --cached`来验证为第一次提交准备了什么。这将显示所有已经移入索引并即将提交的修改。

note: type: Plain text
en: Next, commit the changes stored in the index. The `-c` option specifies to pre-populate the commit message from the original message that you started with in the first commit. This is helpful to avoid retyping it. The `HEAD@{1}` is a special notation for the commit that `HEAD` used to be at prior to the original reset commit (1 change ago).  See linkgit:git-reflog[1] for more details. You may also use any other valid commit reference.
zh_HANS-CN: 接下来，提交存储在索引中的修改。`-c`选项指定从你第一次提交时的原始信息中预先填入提交信息。这对避免重复输入很有帮助。`HEAD@{1}`是一个特殊的符号，表示`HEAD`在最初的重置提交（1次变更前）之前曾经处于的提交。  更多细节见 linkgit:git-reflog[1]。你也可以使用任何其他有效的提交参考。

note: type: Plain text
en: You can repeat steps 2-4 multiple times to break the original code into any number of commits.
zh_HANS-CN: 你可以多次重复第2-4步，将原始代码分解成任意数量的提交。

note: type: Plain text
en: Now you've split out many of the changes into their own commits, and might no longer use the patch mode of `git add`, in order to select all remaining uncommitted changes.
zh_HANS-CN: 现在你已经把许多修改拆成了自己的提交，可能不再使用`git add`的补丁模式，以便选择所有剩余的未提交的修改。

note: type: Plain text
en: Once again, check to verify that you've included what you want to. You may also wish to verify that git diff doesn't show any remaining changes to be committed later.
zh_HANS-CN: 再一次检查以确认你已经包含了你想要的东西。你可能还想确认git diff没有显示任何剩余的修改，以便以后提交。

note: type: Plain text
en: And finally create the final commit.
zh_HANS-CN: 最后创建最后的提交。

note: type: Plain text
en: The tables below show what happens when running:
zh_HANS-CN: 下面的表格显示了运行时发生的情况。

note: type: Plain text
en: to reset the `HEAD` to another commit (`target`) with the different reset options depending on the state of the files.
zh_HANS-CN: 来重置`HEAD`到另一个提交（`target`），根据文件的状态，有不同的重置选项。

note: type: Plain text
en: In these tables, `A`, `B`, `C` and `D` are some different states of a file. For example, the first line of the first table means that if a file is in state `A` in the working tree, in state `B` in the index, in state `C` in `HEAD` and in state `D` in the target, then `git reset --soft target` will leave the file in the working tree in state `A` and in the index in state `B`.  It resets (i.e. moves) the `HEAD` (i.e. the tip of the current branch, if you are on one) to `target` (which has the file in state `D`).
zh_HANS-CN: 在这些表中，`A`、`B`、`C`和`D`是一个文件的一些不同状态。例如，第一个表格的第一行意味着如果一个文件在工作树中处于`A`状态，在索引中处于`B`状态，在`HEAD`中处于`C`状态，在目标中处于`D`状态，那么`git reset --soft target`将使文件在工作树中处于`A`状态，在索引中处于`B`状态。  它重设（即移动）`HEAD`（即当前分支的顶端，如果你在一个分支上）到`target`（它的文件处于`D`状态）。

note: type: delimited block .
en: working index HEAD target         working index HEAD
    ----------------------------------------------------
     A       B     C    D     --soft   A       B     D
    			  --mixed  A       D     D
    			  --hard   D       D     D
    			  --merge (disallowed)
    			  --keep  (disallowed)
zh_HANS-CN: 工作索引 HEAD 目标工作索引 HEAD
    ----------------------------------------------------
     A B C D --软的 A B D
    			  -混合型 A D D
    			  --硬的 D D D
    			  --合并 (不允许)
    			  --保持 (不允许)

note: type: delimited block .
en: working index HEAD target         working index HEAD
    ----------------------------------------------------
     A       B     C    C     --soft   A       B     C
    			  --mixed  A       C     C
    			  --hard   C       C     C
    			  --merge (disallowed)
    			  --keep   A       C     C
zh_HANS-CN: 工作索引 HEAD 目标工作索引 HEAD
    ----------------------------------------------------
     A B C C --软的 A B C
    			  -混合型 A C C
    			  --硬性 C C C
    			  --合并(不允许)
    			  --保持A C C

note: type: delimited block .
en: working index HEAD target         working index HEAD
    ----------------------------------------------------
     B       B     C    D     --soft   B       B     D
    			  --mixed  B       D     D
    			  --hard   D       D     D
    			  --merge  D       D     D
    			  --keep  (disallowed)
zh_HANS-CN: 工作索引 HEAD 目标工作索引 HEAD
    ----------------------------------------------------
     B B C D --软B B D
    			  -混合型 B D D
    			  --硬的 D D D
    			  --合并 D D D
    			  --保持(不允许)

note: type: delimited block .
en: working index HEAD target         working index HEAD
    ----------------------------------------------------
     B       B     C    C     --soft   B       B     C
    			  --mixed  B       C     C
    			  --hard   C       C     C
    			  --merge  C       C     C
    			  --keep   B       C     C
zh_HANS-CN: 工作索引 HEAD 目标工作索引 HEAD
    ----------------------------------------------------
     B B C C --软B B C
    			  -混合型 B C C
    			  --硬性 C C C
    			  --合并 C C C
    			  --保持B C C

note: type: delimited block .
en: working index HEAD target         working index HEAD
    ----------------------------------------------------
     B       C     C    D     --soft   B       C     D
    			  --mixed  B       D     D
    			  --hard   D       D     D
    			  --merge (disallowed)
    			  --keep  (disallowed)
zh_HANS-CN: 工作索引 HEAD 目标工作索引 HEAD
    ----------------------------------------------------
     B C C D --软B C D
    			  -混合型 B D D
    			  --硬的 D D D
    			  --合并 (不允许)
    			  --保持 (不允许)

note: type: delimited block .
en: working index HEAD target         working index HEAD
    ----------------------------------------------------
     B       C     C    C     --soft   B       C     C
    			  --mixed  B       C     C
    			  --hard   C       C     C
    			  --merge  B       C     C
    			  --keep   B       C     C
zh_HANS-CN: 工作索引 HEAD 目标工作索引 HEAD
    ----------------------------------------------------
     B C C C --软B C C
    			  -混合型 B C C
    			  --硬性 C C C
    			  --合并 B C C
    			  --保持B C C

note: type: Plain text
en: `reset --merge` is meant to be used when resetting out of a conflicted merge. Any mergy operation guarantees that the working tree file that is involved in the merge does not have a local change with respect to the index before it starts, and that it writes the result out to the working tree. So if we see some difference between the index and the target and also between the index and the working tree, then it means that we are not resetting out from a state that a mergy operation left after failing with a conflict. That is why we disallow `--merge` option in this case.
zh_HANS-CN: `reset --merge`是指在重设冲突的合并时使用。任何合并操作都会保证参与合并的工作树文件在开始之前没有相对于索引的局部变化，并且会将结果写入工作树。因此，如果我们看到索引和目标之间，以及索引和工作树之间有一些差异，那么这意味着我们没有从一个合并操作失败后留下的冲突状态中重新设置出来。这就是为什么我们在这种情况下不允许使用`--合并`选项。

note: type: Plain text
en: `reset --keep` is meant to be used when removing some of the last commits in the current branch while keeping changes in the working tree. If there could be conflicts between the changes in the commit we want to remove and the changes in the working tree we want to keep, the reset is disallowed. That's why it is disallowed if there are both changes between the working tree and `HEAD`, and between `HEAD` and the target. To be safe, it is also disallowed when there are unmerged entries.
zh_HANS-CN: `reset --keep 意思是在删除当前分支中的一些最后的提交，同时保留工作树中的修改时使用。如果我们想删除的提交和我们想保留的工作树上的修改之间可能存在冲突，那么重置是不允许的。这就是为什么如果工作树和`HEAD'之间，以及`HEAD'和目标之间都有变化，那么就不允许重置。为了安全起见，当有未合并的条目时，也不允许这样做。

note: type: Plain text
en: The following tables show what happens when there are unmerged entries:
zh_HANS-CN: 下表显示了有未合并的条目时发生的情况。

note: type: delimited block .
en: working index HEAD target         working index HEAD
    ----------------------------------------------------
     X       U     A    B     --soft  (disallowed)
    			  --mixed  X       B     B
    			  --hard   B       B     B
    			  --merge  B       B     B
    			  --keep  (disallowed)
zh_HANS-CN: 工作索引 HEAD 目标工作索引 HEAD
    ----------------------------------------------------
     X U A B --软（不允许）。
    			  --混合型 X B B
    			  --硬的 B B B
    			  --合并 B B B
    			  --保持(不允许)

note: type: delimited block .
en: working index HEAD target         working index HEAD
    ----------------------------------------------------
     X       U     A    A     --soft  (disallowed)
    			  --mixed  X       A     A
    			  --hard   A       A     A
    			  --merge  A       A     A
    			  --keep  (disallowed)
zh_HANS-CN: 工作索引 HEAD 目标工作索引 HEAD
    ----------------------------------------------------
     X U A A --软(不允许)
    			  --混合型 X A A
    			  --硬性 A A A
    			  --合并 A A A
    			  --保持(不允许)

note: type: Plain text
en: `X` means any state and `U` means an unmerged index.
zh_HANS-CN: `X`指任何状态，`U`指未合并的索引。

note: type: Plain text
en: git-restore - Restore working tree files
zh_HANS-CN: git-restore - 恢复工作树文件

note: type: Plain text
en: 'git restore' [<options>] [--source=<tree>] [--staged] [--worktree] [--] <pathspec>...
    'git restore' [<options>] [--source=<tree>] [--staged] [--worktree] --pathspec-from-file=<file> [--pathspec-file-nul]
    'git restore' (-p|--patch) [<options>] [--source=<tree>] [--staged] [--worktree] [--] [<pathspec>...]
zh_HANS-CN: 'git restore' [<options>] [--source=<tree>] [--staged] [--worktree] [--] <pathspec>...
    'git restore' [<options>] [--source=<tree>] [--staged] [--worktree] --pathspec-from-file=<file> [--pathspec-file-nul] 。
    'git restore' (-p|--patch) [<options>] [--source=<tree>] [--staged] [--worktree] [--] [<pathspec>...]

note: type: Plain text
en: Restore specified paths in the working tree with some contents from a restore source. If a path is tracked but does not exist in the restore source, it will be removed to match the source.
zh_HANS-CN: 用还原源的一些内容还原工作树中的指定路径。如果一个路径被跟踪，但在还原源中不存在，它将被删除以匹配源。

note: type: Plain text
en: The command can also be used to restore the content in the index with `--staged`, or restore both the working tree and the index with `--staged --worktree`.
zh_HANS-CN: 该命令还可以用来用`--staged`恢复索引中的内容，或者用`--staged --worktree`同时恢复工作树和索引。

note: type: Plain text
en: By default, if `--staged` is given, the contents are restored from `HEAD`, otherwise from the index. Use `--source` to restore from a different commit.
zh_HANS-CN: 默认情况下，如果给了`--staged`，内容将从`HEAD`恢复，否则从索引恢复。使用`--source`来恢复不同的提交。

note: type: Plain text
en: THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
zh_HANS-CN: 这个命令是试验性的。其行为可能会改变。

note: type: Labeled list
en: --source=<tree>
zh_HANS-CN: --source=<tree>（来源）。

note: type: Plain text
en: Restore the working tree files with the content from the given tree. It is common to specify the source tree by naming a commit, branch or tag associated with it.
zh_HANS-CN: 用给定树的内容恢复工作树的文件。通常是通过命名与之相关的提交、分支或标签来指定源树。

note: type: Plain text
en: If not specified, the contents are restored from `HEAD` if `--staged` is given, otherwise from the index.
zh_HANS-CN: 如果没有指定，如果给了`--staged`，则从`HEAD`恢复内容，否则从索引恢复。

note: type: Plain text
en: Interactively select hunks in the difference between the restore source and the restore location. See the ``Interactive Mode'' section of linkgit:git-add[1] to learn how to operate the `--patch` mode.
zh_HANS-CN: 交互式地选择还原源和还原位置之间的差异中的猎物。参见 linkgit:git-add[1] 的 "互动模式 "部分，了解如何操作"--补丁 "模式。

note: type: Plain text
en: Note that `--patch` can accept no pathspec and will prompt to restore all modified paths.
zh_HANS-CN: 请注意，`--patch`可以不接受任何pathspec，并会提示恢复所有修改的路径。

note: type: Plain text
en: Specify the restore location. If neither option is specified, by default the working tree is restored. Specifying `--staged` will only restore the index. Specifying both restores both.
zh_HANS-CN: 指定恢复的位置。如果两个选项都没有指定，默认情况下会还原工作树。指定`--staged`将只恢复索引。指定两个选项将同时还原。

note: type: Plain text
en: Quiet, suppress feedback messages. Implies `--no-progress`.
zh_HANS-CN: 安静，抑制反馈信息。意味着"--没有进展"。

note: type: Plain text
en: When restoring files in the working tree from the index, use stage #2 ('ours') or #3 ('theirs') for unmerged paths.
zh_HANS-CN: 当从索引中恢复工作树中的文件时，对未合并的路径使用阶段#2（'我们的'）或#3（'他们的'）。

note: type: Plain text
en: Note that during `git rebase` and `git pull --rebase`, 'ours' and 'theirs' may appear swapped. See the explanation of the same options in linkgit:git-checkout[1] for details.
zh_HANS-CN: 注意，在`git rebase`和`git pull --rebase`过程中，'我们的'和'他们的'可能会出现互换。详见 linkgit:git-checkout[1] 中对相同选项的解释。

note: type: Plain text
en: When restoring files on the working tree from the index, recreate the conflicted merge in the unmerged paths.
zh_HANS-CN: 当从索引恢复工作树上的文件时，在未合并的路径中重新创建冲突的合并。

note: type: Plain text
en: When restoring files on the working tree from the index, do not abort the operation if there are unmerged entries and neither `--ours`, `--theirs`, `--merge` or `--conflict` is specified. Unmerged paths on the working tree are left alone.
zh_HANS-CN: 当从索引中恢复工作树上的文件时，如果有未合并的条目，并且没有指定`--我们的`、`--他们的`、`--合并`或`--冲突`，不要中止操作。工作树上未合并的路径将被忽略。

note: type: Plain text
en: In sparse checkout mode, by default is to only update entries matched by `<pathspec>` and sparse patterns in $GIT_DIR/info/sparse-checkout. This option ignores the sparse patterns and unconditionally restores any files in `<pathspec>`.
zh_HANS-CN: 在稀疏检出模式下，默认情况下只更新由`<pathspec>`和$GIT_DIR/info/sparse-checkout中稀疏模式匹配的条目。这个选项忽略了稀疏模式，无条件地恢复了`<pathspec>`中的任何文件。

note: type: Plain text
en: If `<pathspec>` names an active submodule and the restore location includes the working tree, the submodule will only be updated if this option is given, in which case its working tree will be restored to the commit recorded in the superproject, and any local modifications overwritten. If nothing (or `--no-recurse-submodules`) is used, submodules working trees will not be updated. Just like linkgit:git-checkout[1], this will detach `HEAD` of the submodule.
zh_HANS-CN: 如果`<pathspec>`命名了一个活动的子模块，并且恢复的位置包括工作树，只有在给出这个选项的情况下，子模块才会被更新，在这种情况下，它的工作树将被恢复到超级项目中记录的提交，并且任何本地修改都会被覆盖。如果什么都不使用（或`--no-recurse-submodules`），子模块的工作树将不会被更新。就像linkgit:git-checkout[1]，这将分离子模块的`HEAD`。

note: type: Plain text
en: In overlay mode, the command never removes files when restoring. In no-overlay mode, tracked files that do not appear in the `--source` tree are removed, to make them match `<tree>` exactly. The default is no-overlay mode.
zh_HANS-CN: 在覆盖模式下，该命令在恢复时不会删除文件。在无覆盖模式下，不出现在"--源 "树中的被追踪文件会被删除，以使它们与"<tree>"完全匹配。默认是无覆盖模式。

note: type: Plain text
en: The following sequence switches to the `master` branch, reverts the `Makefile` to two revisions back, deletes hello.c by mistake, and gets it back from the index.
zh_HANS-CN: 下面的序列切换到 "master "分支，将 "Makefile "恢复到两个修订版，错误地删除了hello.c，并从索引中取回它。

note: type: Plain text
en: restore hello.c from the index
zh_HANS-CN: 从索引中恢复 hello.c

note: type: Plain text
en: If you want to restore _all_ C source files to match the version in the index, you can say
zh_HANS-CN: 如果你想恢复_所有的C源文件，使之与索引中的版本一致，你可以说

note: type: Plain text
en: Note the quotes around `*.c`.  The file `hello.c` will also be restored, even though it is no longer in the working tree, because the file globbing is used to match entries in the index (not in the working tree by the shell).
zh_HANS-CN: 注意 "*.c "周围的引号。  文件`hello.c`也将被恢复，尽管它已经不在工作树中了，因为文件globbing是用来匹配索引中的条目的（不是由shell在工作树中）。

note: type: Plain text
en: To restore all files in the current directory
zh_HANS-CN: 要恢复当前目录下的所有文件

note: type: Plain text
en: or to restore all working tree files with 'top' pathspec magic (see linkgit:gitglossary[7])
zh_HANS-CN: 或者用'top'pathspec魔法恢复所有工作树文件（见linkgit:gitglossary[7]）。

note: type: Plain text
en: To restore a file in the index to match the version in `HEAD` (this is the same as using linkgit:git-reset[1])
zh_HANS-CN: 将索引中的文件恢复到与`HEAD`中的版本一致（这与使用linkgit:git-reset[1]相同）。

note: type: Plain text
en: or you can restore both the index and the working tree (this the same as using linkgit:git-checkout[1])
zh_HANS-CN: 或者你可以同时恢复索引和工作树（这与使用linkgit:git-checkout[1]相同）。

note: type: Plain text
en: or the short form which is more practical but less readable:
zh_HANS-CN: 或更实用但可读性较差的简短形式。

note: type: Plain text
en: git-rev-list - Lists commit objects in reverse chronological order
zh_HANS-CN: git-rev-list 按照时间倒序列出提交对象

note: type: Labeled list
en: --exclude=<glob-pattern>
zh_HANS-CN: --exclude=<glob-pattern>（排除）。

note: type: Plain text
en: Do not include refs matching '<glob-pattern>' that the next `--all`, `--branches`, `--tags`, `--remotes`, or `--glob` would otherwise consider. Repetitions of this option accumulate exclusion patterns up to the next `--all`, `--branches`, `--tags`, `--remotes`, or `--glob` option (other options or arguments do not clear accumulated patterns).
zh_HANS-CN: 不包括匹配"<glob-pattern>"的参考文献，否则下一个`--all`、`--branches`、`--tags`、`--remotes`或`--glob`会考虑这些参考文献。重复这个选项可以累积排除模式，直到下一个`----all`、`---branches`、`---tags`、`---remotes`或`---glob`选项（其他选项或参数不清除累积模式）。

note: type: Plain text
en: The patterns given should not begin with `refs/heads`, `refs/tags`, or `refs/remotes` when applied to `--branches`, `--tags`, or `--remotes`, respectively, and they must begin with `refs/` when applied to `--glob` or `--all`. If a trailing '/{asterisk}' is intended, it must be given explicitly.
zh_HANS-CN: 当应用于"--分支"、"--标签 "或"--远程 "时，给出的模式不应该以 "refs/heads"、"refs/tags "或 "refs/remotes "开头，而当应用于"--glob "或 "all "时，必须以 "refs/"开头。如果打算使用尾部的"/{asterisk}"，必须明确给出。

note: type: Plain text
en: Remove files matching pathspec from the index, or from the working tree and the index. `git rm` will not remove a file from just your working directory. (There is no option to remove a file only from the working tree and yet keep it in the index; use `/bin/rm` if you want to do that.) The files being removed have to be identical to the tip of the branch, and no updates to their contents can be staged in the index, though that default behavior can be overridden with the `-f` option.  When `--cached` is given, the staged content has to match either the tip of the branch or the file on disk, allowing the file to be removed from just the index. When sparse-checkouts are in use (see linkgit:git-sparse-checkout[1]), `git rm` will only remove paths within the sparse-checkout patterns.
zh_HANS-CN: 从索引中，或从工作树和索引中删除与pathspec匹配的文件。`git rm`不会只从你的工作目录中删除一个文件。(没有选项可以只从工作树中删除一个文件，但在索引中保留它；如果你想这样做，就用`/bin/rm`)。被删除的文件必须与分支的顶端相同，而且它们的内容不能在索引中进行更新，尽管可以用`-f`选项覆盖这一默认行为。  当给定`--cached`时，缓存的内容必须与分支的顶端或磁盘上的文件相匹配，允许文件只从索引中被删除。当使用稀疏检查时（见linkgit:git-sparse-checkout[1]），`git rm`将只删除稀疏检查模式内的路径。

note: type: Plain text
en: Files to remove.  A leading directory name (e.g. `dir` to remove `dir/file1` and `dir/file2`) can be given to remove all files in the directory, and recursively all sub-directories, but this requires the `-r` option to be explicitly given.
zh_HANS-CN: 要删除的文件。  可以给一个领先的目录名（例如，`dir`删除`dir/file1`和`dir/file2`）来删除该目录下的所有文件，并递归所有子目录，但这需要明确给出`-r`选项。

note: type: Plain text
en: The command removes only the paths that are known to Git.
zh_HANS-CN: 该命令只删除Git已知的路径。

note: type: Plain text
en: File globbing matches across directory boundaries.  Thus, given two directories `d` and `d2`, there is a difference between using `git rm 'd*'` and `git rm 'd/*'`, as the former will also remove all of directory `d2`.
zh_HANS-CN: 文件球化可以跨越目录边界进行匹配。  因此，给定两个目录`d`和`d2`，使用`git rm 'd*'`和`git rm 'd/*'`是有区别的，因为前者会同时删除`d2`目录的所有内容。

note: type: Plain text
en: Override the up-to-date check.
zh_HANS-CN: 覆盖最新的检查。

note: type: Plain text
en: Don't actually remove any file(s).  Instead, just show if they exist in the index and would otherwise be removed by the command.
zh_HANS-CN: 实际上不要删除任何文件。  相反，只是显示它们是否存在于索引中，否则会被命令删除。

note: type: Plain text
en: Allow recursive removal when a leading directory name is given.
zh_HANS-CN: 当给出一个领先的目录名称时，允许递归删除。

note: type: Plain text
en: Use this option to unstage and remove paths only from the index.  Working tree files, whether modified or not, will be left alone.
zh_HANS-CN: 使用这个选项，只从索引中解开阶段并删除路径。  工作树文件，无论是否被修改过，都将被单独留下。

note: type: Plain text
en: Exit with a zero status even if no files matched.
zh_HANS-CN: 即使没有文件匹配，也以零状态退出。

note: type: Title -
en: REMOVING FILES THAT HAVE DISAPPEARED FROM THE FILESYSTEM
zh_HANS-CN: 删除从文件系统中消失的文件

note: type: Title ~
en: Using ``git commit -a''
zh_HANS-CN: 使用``git commit -a''

note: type: Plain text
en: If you intend that your next commit should record all modifications of tracked files in the working tree and record all removals of files that have been removed from the working tree with `rm` (as opposed to `git rm`), use `git commit -a`, as it will automatically notice and record all removals.  You can also have a similar effect without committing by using `git add -u`.
zh_HANS-CN: 如果你想让你的下一次提交记录工作树中所有被跟踪的文件的修改，并记录所有用`rm`从工作树中删除的文件（而不是`git rm`），请使用`git commit -a`，它将自动注意并记录所有的删除。  你也可以通过使用`git add -u`在不提交的情况下获得类似的效果。

note: type: Title ~
en: Using ``git add -A''
zh_HANS-CN: 使用``git add -A''

note: type: Plain text
en: When accepting a new code drop for a vendor branch, you probably want to record both the removal of paths and additions of new paths as well as modifications of existing paths.
zh_HANS-CN: 当接受一个供应商分支的新代码投放时，你可能想同时记录删除路径和增加新路径以及修改现有路径的内容。

note: type: Plain text
en: Typically you would first remove all tracked files from the working tree using this command:
zh_HANS-CN: 通常情况下，你会先用这个命令从工作树上删除所有被追踪的文件。

note: type: Plain text
en: and then untar the new code in the working tree. Alternately you could 'rsync' the changes into the working tree.
zh_HANS-CN: 然后解开工作树上的新代码。另外，你也可以通过 "rsync "把修改的内容放到工作树上。

note: type: Plain text
en: After that, the easiest way to record all removals, additions, and modifications in the working tree is:
zh_HANS-CN: 之后，记录工作树中所有的删除、添加和修改的最简单方法是。

note: type: Plain text
en: If all you really want to do is to remove from the index the files that are no longer present in the working tree (perhaps because your working tree is dirty so that you cannot use `git commit -a`), use the following command:
zh_HANS-CN: 如果你真正想做的只是从索引中删除那些不再出现在工作树中的文件（也许是因为你的工作树很脏，所以你不能使用`git commit -a`），使用以下命令。

note: type: Plain text
en: Only submodules using a gitfile (which means they were cloned with a Git version 1.7.8 or newer) will be removed from the work tree, as their repository lives inside the .git directory of the superproject. If a submodule (or one of those nested inside it)  still uses a .git directory, `git rm` will move the submodules git directory into the superprojects git directory to protect the submodule's history. If it exists the submodule.<name> section in the linkgit:gitmodules[5] file will also be removed and that file will be staged (unless --cached or -n are used).
zh_HANS-CN: 只有使用 gitfile 的子模块（这意味着它们是用 1.7.8 或更新的 Git 版本克隆的）才会从工作树中移除，因为它们的仓库住在超级项目的 .git 目录中。如果一个子模块（或嵌套在它里面的一个）仍然使用.git目录，`git rm`将把子模块的git目录移到超级项目的git目录中，以保护子模块的历史。如果它存在，linkgit:gitmodules[5]文件中的submodule.<name>部分也将被移除，该文件将被暂存（除非使用了-cached或-n）。

note: type: Plain text
en: A submodule is considered up to date when the HEAD is the same as recorded in the index, no tracked files are modified and no untracked files that aren't ignored are present in the submodules work tree.  Ignored files are deemed expendable and won't stop a submodule's work tree from being removed.
zh_HANS-CN: 当HEAD与索引中记录的相同时，一个子模块被认为是最新的，没有跟踪的文件被修改，在子模块的工作树中没有没有被忽略的未跟踪的文件。  忽略的文件被认为是可消耗的，不会阻止一个子模块的工作树被删除。

note: type: Plain text
en: If you only want to remove the local checkout of a submodule from your work tree without committing the removal, use linkgit:git-submodule[1] `deinit` instead. Also see linkgit:gitsubmodules[7] for details on submodule removal.
zh_HANS-CN: 如果你只想从你的工作树中移除一个子模块的本地签出而不提交移除，使用linkgit:git-submodule[1] `deinit`代替。也请看 linkgit:gitsubmodules[7] 了解关于子模块移除的细节。

note: type: Plain text
en: Removes all `*.txt` files from the index that are under the `Documentation` directory and any of its subdirectories.
zh_HANS-CN: 从索引中删除所有`*.txt`文件，这些文件在`Documentation`目录和它的任何子目录下。

note: type: Plain text
en: Note that the asterisk `*` is quoted from the shell in this example; this lets Git, and not the shell, expand the pathnames of files and subdirectories under the `Documentation/` directory.
zh_HANS-CN: 注意，在这个例子中，星号`*`被引自shell；这让Git，而不是shell，扩展`Documentation/`目录下的文件和子目录的路径名。

note: type: Plain text
en: Because this example lets the shell expand the asterisk (i.e. you are listing the files explicitly), it does not remove `subdir/git-foo.sh`.
zh_HANS-CN: 因为这个例子让shell展开星号（即你明确列出了文件），它没有删除`subdir/git-foo.sh`。

note: type: Plain text
en: Each time a superproject update removes a populated submodule (e.g. when switching between commits before and after the removal) a stale submodule checkout will remain in the old location. Removing the old directory is only safe when it uses a gitfile, as otherwise the history of the submodule will be deleted too. This step will be obsolete when recursive submodule update has been implemented.
zh_HANS-CN: 每次超级项目更新删除一个已填充的子模块（例如，在删除前后的提交之间切换时），一个陈旧的子模块检出将保留在旧的位置。只有在使用gitfile时，删除旧目录才是安全的，否则子模块的历史也会被删除。当递归子模块更新被实施后，这个步骤将被淘汰。

note: type: Plain text
en: 'git shortlog' [<options>] [<revision range>] [[--] <path>...]
    git log --pretty=short | 'git shortlog' [<options>]
zh_HANS-CN: 'git shortlog' [<options>] [<revision range>] [[--] <path>...] 。
    git log --pretty=short | 'git shortlog' [<options>] 。

note: type: Plain text
en: Summarizes 'git log' output in a format suitable for inclusion in release announcements. Each commit will be grouped by author and title.
zh_HANS-CN: 将'git log'输出总结为适合纳入发布公告的格式。每个提交将按作者和标题分组。

note: type: Plain text
en: Additionally, "[PATCH]" will be stripped from the commit description.
zh_HANS-CN: 此外，"[PATCH]"将从提交描述中被剥离。

note: type: Plain text
en: If no revisions are passed on the command line and either standard input is not a terminal or there is no current branch, 'git shortlog' will output a summary of the log read from standard input, without reference to the current repository.
zh_HANS-CN: 如果命令行上没有传递修订版，而且标准输入不是终端，或者没有当前分支，'git shortlog'将输出从标准输入读取的日志摘要，而不参考当前版本库。

note: type: Plain text
en: Sort output according to the number of commits per author instead of author alphabetic order.
zh_HANS-CN: 根据每个作者的提交数量对输出进行排序，而不是按照作者的字母顺序。

note: type: Plain text
en: Suppress commit description and provide a commit count summary only.
zh_HANS-CN: 抑制提交描述，只提供提交计数摘要。

note: type: Plain text
en: Show the email address of each author.
zh_HANS-CN: 显示每个作者的电子邮件地址。

note: type: Plain text
en: Instead of the commit subject, use some other information to describe each commit.  '<format>' can be any string accepted by the `--format` option of 'git log', such as '* [%h] %s'.  (See the "PRETTY FORMATS" section of linkgit:git-log[1].)
zh_HANS-CN: 代替提交主题，使用一些其他信息来描述每个提交。  <format>'可以是任何被'git log'的`--format'选项接受的字符串，比如'* [%h] %s'。  参见linkgit:git-log[1]的 "PRETTY FORMATS "部分）。

note: type: Plain text
en: Each pretty-printed commit will be rewrapped before it is shown.
zh_HANS-CN: 每个漂亮的印刷品承诺在展示之前都会被重新包装。

note: type: Plain text
en: Group commits based on `<type>`. If no `--group` option is specified, the default is `author`. `<type>` is one of:
zh_HANS-CN: 根据`<类型>`对提交进行分组。如果没有指定`--组'选项，默认为`作者'。`<类型>`是以下之一。

note: type: Plain text
en: `author`, commits are grouped by author
zh_HANS-CN: "作者"，提交内容按作者分组

note: type: Plain text
en: `committer`, commits are grouped by committer (the same as `-c`)
zh_HANS-CN: 提交人"，提交内容按提交人分组（与 "c "相同）。

note: type: Plain text
en: `trailer:<field>`, the `<field>` is interpreted as a case-insensitive commit message trailer (see linkgit:git-interpret-trailers[1]). For example, if your project uses `Reviewed-by` trailers, you might want to see who has been reviewing with `git shortlog -ns --group=trailer:reviewed-by`.
zh_HANS-CN: `trailer:<field>`，`<field>`被解释为不区分大小写的提交消息预告片（见 linkgit:git-interpret-trailers[1]）。例如，如果你的项目使用 `Reviewed-by` 拖车，你可能想用 `git shortlog -ns --group=trailer:reviewed-by` 来查看谁在审核。

note: type: Plain text
en: Note that commits that do not include the trailer will not be counted.  Likewise, commits with multiple trailers (e.g., multiple signoffs) may be counted more than once (but only once per unique trailer value in that commit).
zh_HANS-CN: 请注意，不包括拖车的提交将不被计算在内。  同样地，有多个拖车的提交（例如多个签收）可以被计算一次（但该提交中每个独特的拖车值只能计算一次）。

note: type: Plain text
en: Shortlog will attempt to parse each trailer value as a `name <email>` identity. If successful, the mailmap is applied and the email is omitted unless the `--email` option is specified. If the value cannot be parsed as an identity, it will be taken literally and completely.
zh_HANS-CN: Shortlog将尝试把每个拖车值解析为`name <email>`的身份。如果成功，将应用mailmap，除非指定`--email`选项，否则将省略email。如果该值不能被解析为一个身份，那么它将被完全视为字面意思。

note: type: Plain text
en: If `--group` is specified multiple times, commits are counted under each value (but again, only once per unique value in that commit). For example, `git shortlog --group=author --group=trailer:co-authored-by` counts both authors and co-authors.
zh_HANS-CN: 如果"--组 "被多次指定，每个值下的提交都会被计算（但同样，每个提交中的唯一值只能计算一次）。例如，`git shortlog --group=author --group=trailer:co-authored-by`同时计算作者和共同作者。

note: type: Plain text
en: This is an alias for `--group=committer`.
zh_HANS-CN: 这是`--group=committer`的一个别名。

note: type: Plain text
en: Linewrap the output by wrapping each line at `width`.  The first line of each entry is indented by `indent1` spaces, and the second and subsequent lines are indented by `indent2` spaces. `width`, `indent1`, and `indent2` default to 76, 6 and 9 respectively.
zh_HANS-CN: 通过以`width`包裹每一行来对输出进行换行。  每个条目的第一行缩进`缩进1`个空格，第二行和后续行缩进`缩进2`个空格。`width`, `indent1`, 和`indent2`分别默认为76, 6和9。

note: type: Plain text
en: If width is `0` (zero) then indent the lines of the output without wrapping them.
zh_HANS-CN: 如果宽度为`0`（零），则缩进输出的行数而不包裹它们。

note: type: Plain text
en: Show only commits in the specified revision range.  When no <revision range> is specified, it defaults to `HEAD` (i.e. the whole history leading to the current commit).  `origin..HEAD` specifies all the commits reachable from the current commit (i.e. `HEAD`), but not from `origin`. For a complete list of ways to spell <revision range>, see the "Specifying Ranges" section of linkgit:gitrevisions[7].
zh_HANS-CN: 只显示指定修订范围内的提交。  当没有指定<修订范围>时，默认为`HEAD`（即导致当前提交的整个历史）。  `origin...HEAD`指定了从当前提交（即`HEAD`）可以到达的所有提交，但不是从`origin`。关于<revision range>的完整拼写方式，见linkgit:gitrevisions[7]的 "指定范围 "部分。

note: type: Plain text
en: Consider only commits that are enough to explain how the files that match the specified paths came to be.
zh_HANS-CN: 只考虑那些足以解释符合指定路径的文件是如何产生的提交。

note: type: Plain text
en: Note that if `git shortlog` is run outside of a repository (to process log contents on standard input), it will look for a `.mailmap` file in the current directory.
zh_HANS-CN: 注意，如果`git shortlog`在版本库外运行（处理标准输入的日志内容），它将在当前目录下寻找一个`.mailmap`文件。

note: type: Plain text
en: git-status - Show the working tree status
zh_HANS-CN: git-status - 显示工作树状态

note: type: Plain text
en: Displays paths that have differences between the index file and the current HEAD commit, paths that have differences between the working tree and the index file, and paths in the working tree that are not tracked by Git (and are not ignored by linkgit:gitignore[5]). The first are what you _would_ commit by running `git commit`; the second and third are what you _could_ commit by running 'git add' before running `git commit`.
zh_HANS-CN: 显示索引文件和当前HEAD提交有差异的路径，工作树和索引文件有差异的路径，以及工作树中不被Git追踪的路径（也不被linkgit:gitignore[5]忽略）。前者是你通过运行 "git commit "会提交的东西；第二和第三者是你在运行 "git commit "之前通过运行 "git add "可以提交的东西。

note: type: Plain text
en: Give the output in the short-format.
zh_HANS-CN: 以简短的形式给出输出。

note: type: Plain text
en: Show the number of entries currently stashed away.
zh_HANS-CN: 显示目前藏匿的条目数量。

note: type: Plain text
en: Give the output in an easy-to-parse format for scripts.  This is similar to the short output, but will remain stable across Git versions and regardless of user configuration. See below for details.
zh_HANS-CN: 以易于解析的格式给出脚本的输出。  这类似于简短的输出，但在不同的Git版本中，无论用户配置如何，都会保持稳定。详见下文。

note: type: Plain text
en: The version parameter is used to specify the format version.  This is optional and defaults to the original version 'v1' format.
zh_HANS-CN: 版本参数用于指定格式版本。  这是可选的，默认为原始版本的 "v1 "格式。

note: type: Plain text
en: Give the output in the long-format. This is the default.
zh_HANS-CN: 给出长格式的输出。这是默认的。

note: type: Plain text
en: In addition to the names of files that have been changed, also show the textual changes that are staged to be committed (i.e., like the output of `git diff --cached`). If `-v` is specified twice, then also show the changes in the working tree that have not yet been staged (i.e., like the output of `git diff`).
zh_HANS-CN: 除了显示被修改的文件名外，还显示被分阶段提交的文本修改（即，像`git diff --cached`的输出）。如果`-v`被指定了两次，那么也会显示工作树中尚未分阶段的变化（即，像`git diff`的输出）。

note: type: Plain text
en: The mode parameter is used to specify the handling of untracked files.  It is optional: it defaults to 'all', and if specified, it must be stuck to the option (e.g. `-uno`, but not `-u no`).
zh_HANS-CN: 模式参数用于指定对未跟踪文件的处理。  它是可选的：默认为 "所有"，如果指定，必须与选项卡在一起（例如，`-uno`，但不是`-u no`）。

note: type: Plain text
en: 'no'     - Show no untracked files.
zh_HANS-CN: 'no' - 不显示未跟踪的文件。

note: type: Plain text
en: 'normal' - Shows untracked files and directories.
zh_HANS-CN: 'normal' - 显示未被追踪的文件和目录。

note: type: Plain text
en: When `-u` option is not used, untracked files and directories are shown (i.e. the same as specifying `normal`), to help you avoid forgetting to add newly created files.  Because it takes extra work to find untracked files in the filesystem, this mode may take some time in a large working tree.  Consider enabling untracked cache and split index if supported (see `git update-index --untracked-cache` and `git update-index --split-index`), Otherwise you can use `no` to have `git status` return more quickly without showing untracked files.
zh_HANS-CN: 当不使用`-u`选项时，将显示未跟踪的文件和目录（即与指定`normal`相同），以帮助你避免忘记添加新创建的文件。  因为在文件系统中寻找未跟踪的文件需要额外的工作，在一个大的工作树中，这种模式可能需要一些时间。  如果支持的话，考虑启用无痕缓存和分割索引（见`git upd-index --untracked-cache`和`git upd-index --split-index`），否则你可以使用`no`来让`git status`更快地返回而不显示无痕文件。

note: type: Plain text
en: Ignore changes to submodules when looking for changes. <when> can be either "none", "untracked", "dirty" or "all", which is the default.  Using "none" will consider the submodule modified when it either contains untracked or modified files or its HEAD differs from the commit recorded in the superproject and can be used to override any settings of the 'ignore' option in linkgit:git-config[1] or linkgit:gitmodules[5]. When "untracked" is used submodules are not considered dirty when they only contain untracked content (but they are still scanned for modified content). Using "dirty" ignores all changes to the work tree of submodules, only changes to the commits stored in the superproject are shown (this was the behavior before 1.7.0). Using "all" hides all changes to submodules (and suppresses the output of submodule summaries when the config option `status.submoduleSummary` is set).
zh_HANS-CN: 在寻找变化时忽略子模块的变化。<when>可以是 "none"、"untracked"、"dirty "或 "all"，这是默认的。  使用 "none"，當子模塊包含未被追蹤或修訂的檔案，或者它的頭部與超級工程中記錄的提交不同時，就會認為子模塊被修改了，可以用來覆蓋 linkgit:git-config[1] 或 linkgit:gitmodules[5] 中 "忽略 "選項的任何設定。当使用 "untracked "时，当子模块只包含未跟踪的内容时，不被认为是脏的（但它们仍然被扫描为修改的内容）。使用 "dirty "会忽略所有对子模块工作树的修改，只显示存储在超级项目中的提交的修改（这是1.7.0之前的行为）。使用 "all "会隐藏子模块的所有变化（当配置选项`status.submoduleSummary`被设置时，会抑制子模块摘要的输出）。

note: type: Plain text
en: Show ignored files as well.
zh_HANS-CN: 也显示忽略的文件。

note: type: Plain text
en: The mode parameter is used to specify the handling of ignored files.  It is optional: it defaults to 'traditional'.
zh_HANS-CN: 模式参数用于指定对被忽略文件的处理。  它是可选的：默认为 "传统"。

note: type: Plain text
en: 'traditional' - Shows ignored files and directories, unless
zh_HANS-CN: '传统' - 显示被忽略的文件和目录，除非

note: type: Plain text
en: 'no'	        - Show no ignored files.
zh_HANS-CN: 'no' - 不显示被忽略的文件。

note: type: Plain text
en: 'matching'    - Shows ignored files and directories matching an
zh_HANS-CN: 'matching' - 显示忽略的文件和目录，这些文件和目录符合

note: type: Plain text
en: ignore pattern.
zh_HANS-CN: 无视模式。

note: type: Plain text
en: When 'matching' mode is specified, paths that explicitly match an ignored pattern are shown. If a directory matches an ignore pattern, then it is shown, but not paths contained in the ignored directory. If a directory does not match an ignore pattern, but all contents are ignored, then the directory is not shown, but all contents are shown.
zh_HANS-CN: 当指定 "匹配 "模式时，明确匹配忽略模式的路径会被显示。如果一个目录与忽略模式相匹配，那么它就会被显示，但不显示被忽略目录中包含的路径。如果一个目录不匹配忽略模式，但所有内容都被忽略，那么该目录不被显示，但所有内容被显示。

note: type: Plain text
en: Terminate entries with NUL, instead of LF.  This implies the `--porcelain=v1` output format if no other format is given.
zh_HANS-CN: 用NUL而不是LF来终止条目。  如果没有给出其他格式，这就意味着`--porcelain=v1`的输出格式。

note: type: Plain text
en: Display untracked files in columns. See configuration variable `column.status` for option syntax. `--column` and `--no-column` without options are equivalent to 'always' and 'never' respectively.
zh_HANS-CN: 在列中显示未跟踪的文件。选项语法见配置变量`column.status`。`--column`和`--no-column`没有选项，分别相当于'always'和'never'。

note: type: Plain text
en: Display or do not display detailed ahead/behind counts for the branch relative to its upstream branch.  Defaults to true.
zh_HANS-CN: 显示或不显示该分支相对于其上游分支的详细超前/滞后计数。  默认为true。

note: type: Plain text
en: Turn on/off rename detection regardless of user configuration.  See also linkgit:git-diff[1] `--no-renames`.
zh_HANS-CN: 开启/关闭重名检测，不受用户配置影响。  参见linkgit:git-diff[1] `--no-renames`。

note: type: Plain text
en: Turn on rename detection, optionally setting the similarity threshold.  See also linkgit:git-diff[1] `--find-renames`.
zh_HANS-CN: 开启重名检测，可选择设置相似度阈值。  参见 linkgit:git-diff[1] `--find-renames`。

note: type: Plain text
en: See the 'pathspec' entry in linkgit:gitglossary[7].
zh_HANS-CN: 参见 linkgit:gitglossary[7] 中的'pathspec'条目。

note: type: Plain text
en: The output from this command is designed to be used as a commit template comment.  The default, long format, is designed to be human readable, verbose and descriptive.  Its contents and format are subject to change at any time.
zh_HANS-CN: 这个命令的输出是用来作为提交模板注释的。  默认的长篇格式是为了让人可读性强、言简意赅和描述性好。  其内容和格式可以随时更改。

note: type: Plain text
en: The paths mentioned in the output, unlike many other Git commands, are made relative to the current directory if you are working in a subdirectory (this is on purpose, to help cutting and pasting). See the status.relativePaths config option below.
zh_HANS-CN: 与许多其他 Git 命令不同，如果你在子目录中工作，输出中提到的路径是相对于当前目录的（这是故意的，以帮助剪切和粘贴）。参见下面的 status.relativePaths 配置选项。

note: type: Title ~
en: Short Format
zh_HANS-CN: 简短格式

note: type: Plain text
en: In the short-format, the status of each path is shown as one of these forms
zh_HANS-CN: 在简短的格式中，每个路径的状态显示为以下形式之一

note: type: Plain text
en: where `ORIG_PATH` is where the renamed/copied contents came from. `ORIG_PATH` is only shown when the entry is renamed or copied. The `XY` is a two-letter status code.
zh_HANS-CN: 其中`ORIG_PATH`是重命名/复制的内容的来源。`ORIG_PATH`只有在条目被重命名或复制时才会显示。`XY`是一个双字母的状态代码。

note: type: Plain text
en: The fields (including the `->`) are separated from each other by a single space. If a filename contains whitespace or other nonprintable characters, that field will be quoted in the manner of a C string literal: surrounded by ASCII double quote (34) characters, and with interior special characters backslash-escaped.
zh_HANS-CN: 各个字段（包括`->`）之间用一个空格隔开。如果一个文件名包含空白或其他不可打印的字符，该字段将以C语言字符串字面的方式被引用：由ASCII双引号（34）字符包围，内部的特殊字符被反斜线省略。

note: type: Plain text
en: There are three different types of states that are shown using this format, and each one uses the `XY` syntax differently:
zh_HANS-CN: 有三种不同类型的状态是使用这种格式显示的，每一种都以不同的方式使用`XY`语法。

note: type: Plain text
en: When a merge is occurring and the merge was successful, or outside of a merge
zh_HANS-CN: 当一个合并正在发生并且合并成功时，或者在合并之外

note: type: Plain text
en: situation, `X` shows the status of the index and `Y` shows the status of the working tree.
zh_HANS-CN: 情况，`X`显示索引的状态，`Y`显示工作树的状态。

note: type: Plain text
en: When a merge conflict has occurred and has not yet been resolved, `X` and `Y`
zh_HANS-CN: 当发生合并冲突且尚未解决时，"X "和 "Y "就会出现。

note: type: Plain text
en: show the state introduced by each head of the merge, relative to the common ancestor. These paths are said to be _unmerged_.
zh_HANS-CN: 显示了相对于共同祖先而言，合并的每个头所引入的状态。这些路径被称为_未合并_。

note: type: Plain text
en: When a path is untracked, `X` and `Y` are always the same, since they are
zh_HANS-CN: 当一个路径没有被追踪时，`X`和`Y`总是相同的，因为它们是

note: type: Plain text
en: unknown to the index. `??` is used for untracked paths. Ignored files are not listed unless `--ignored` is used; if it is, ignored files are indicated by `!!`.
zh_HANS-CN: 未知的索引。`??`用于未跟踪的路径。除非使用了`--ignored`，否则不列出被忽略的文件；如果使用了，则用`！！`表示被忽略的文件。

note: type: Plain text
en: Note that the term _merge_ here also includes rebases using the default `--merge` strategy, cherry-picks, and anything else using the merge machinery.
zh_HANS-CN: 请注意，这里的_merge_也包括使用默认的`--merge`策略的rebases，cherry-pick，以及其他任何使用merge机制的东西。

note: type: Plain text
en: In the following table, these three classes are shown in separate sections, and these characters are used for `X` and `Y` fields for the first two sections that show tracked paths:
zh_HANS-CN: 在下面的表格中，这三个类别分别显示在不同的部分，这些字符用于显示跟踪路径的前两个部分的`X`和`Y`字段。

note: type: Plain text
en: ' ' = unmodified
zh_HANS-CN: '' = 未修改的

note: type: Plain text
en: 'M' = modified
zh_HANS-CN: 'M' = 修改过的

note: type: Plain text
en: 'A' = added
zh_HANS-CN: 'A'=添加

note: type: Plain text
en: 'D' = deleted
zh_HANS-CN: 'D' = 删除

note: type: Plain text
en: 'R' = renamed
zh_HANS-CN: 'R' = 重命名

note: type: Plain text
en: 'U' = updated but unmerged
zh_HANS-CN: 'U'=更新但未合并

note: type: Plain text
en: Submodules have more state and instead report
    		M    the submodule has a different HEAD than
    		     recorded in the index
    		m    the submodule has modified content
    		?    the submodule has untracked files
    since modified content or untracked files in a submodule cannot be added
    via `git add` in the superproject to prepare a commit.
zh_HANS-CN: 子模块有更多的状态，而是报告
    		M的子模块有一个不同的HEAD比
    		     记录在索引中
    		m 该子模块有修改的内容
    		该子模块有未跟踪的文件
    因为子模块中的修改内容或未跟踪的文件不能被添加到
    通过超级项目中的`git add`来准备提交。

note: type: Plain text
en: 'm' and '?' are applied recursively. For example if a nested submodule in a submodule contains an untracked file, this is reported as '?' as well.
zh_HANS-CN: 'm'和'?'是递归应用的。例如，如果一个子模块中的嵌套子模块包含一个未跟踪的文件，这也会报告为'?

note: type: Plain text
en: If -b is used the short-format status is preceded by a line
zh_HANS-CN: 如果使用了-b，短格式的状态前面会有一行

note: type: Title ~
en: Porcelain Format Version 1
zh_HANS-CN: 瓷器格式版本1

note: type: Plain text
en: Version 1 porcelain format is similar to the short format, but is guaranteed not to change in a backwards-incompatible way between Git versions or based on user configuration. This makes it ideal for parsing by scripts.  The description of the short format above also describes the porcelain format, with a few exceptions:
zh_HANS-CN: 第1版的瓷器格式与短格式类似，但保证不会在Git版本之间以向后兼容的方式或基于用户配置而改变。这使得它成为脚本解析的理想选择。  上面对短格式的描述也是对瓷器格式的描述，但有一些例外。

note: type: Plain text
en: The user's color.status configuration is not respected; color will always be off.
zh_HANS-CN: 用户的color.status配置不被尊重，颜色将永远是关闭的。

note: type: Plain text
en: The user's status.relativePaths configuration is not respected; paths shown will always be relative to the repository root.
zh_HANS-CN: 用户的 status.relativePaths 配置不被尊重；显示的路径将总是相对于版本库根目录。

note: type: Plain text
en: There is also an alternate -z format recommended for machine parsing. In that format, the status field is the same, but some other things change.  First, the '\->' is omitted from rename entries and the field order is reversed (e.g 'from \-> to' becomes 'to from'). Second, a NUL (ASCII 0) follows each filename, replacing space as a field separator and the terminating newline (but a space still separates the status field from the first filename).  Third, filenames containing special characters are not specially formatted; no quoting or backslash-escaping is performed.
zh_HANS-CN: 还有一种替代的-z格式，建议用于机器解析。在这种格式中，状态字段是相同的，但其他一些事情发生了变化。  首先，重命名条目中的"\->"被省略，字段顺序被颠倒（例如 "from\-> to "变成 "to from"）。第二，每个文件名后面都有一个NUL（ASCII 0），取代空格作为字段分隔符和终止换行符（但空格仍然将状态字段与第一个文件名分开）。  第三，包含特殊字符的文件名不被特别格式化；不进行引号或反斜线escaping。

note: type: Plain text
en: Any submodule changes are reported as modified `M` instead of `m` or single `?`.
zh_HANS-CN: 任何子模块的变化都被报告为修改的`M'，而不是`m'或单一的`?'。

note: type: Title ~
en: Porcelain Format Version 2
zh_HANS-CN: 瓷器格式版本2

note: type: Plain text
en: Version 2 format adds more detailed information about the state of the worktree and changed items.  Version 2 also defines an extensible set of easy to parse optional headers.
zh_HANS-CN: 第二版格式增加了关于工作树的状态和变化的项目的更多详细信息。  第2版还定义了一套可扩展的、易于解析的可选头文件。

note: type: Plain text
en: Header lines start with "#" and are added in response to specific command line arguments.  Parsers should ignore headers they don't recognize.
zh_HANS-CN: 标头行以 "#"开头，是为响应特定的命令行参数而添加的。  解析器应该忽略他们不认识的标题。

note: type: Title ^
en: Branch Headers
zh_HANS-CN: 分支机构负责人

note: type: Plain text
en: If `--branch` is given, a series of header lines are printed with information about the current branch.
zh_HANS-CN: 如果给了`--branch`，就会打印出一系列标题行，其中有关于当前分支的信息。

note: type: delimited block .
en: Line                                     Notes
    ------------------------------------------------------------
    # branch.oid <commit> | (initial)        Current commit.
    # branch.head <branch> | (detached)      Current branch.
    # branch.upstream <upstream_branch>      If upstream is set.
    # branch.ab +<ahead> -<behind>           If upstream is set and
    					 the commit is present.
    ------------------------------------------------------------
zh_HANS-CN: 线路说明
    ------------------------------------------------------------
    # branch.oid <commit> | (初始) 当前的提交。
    # branch.head <branch> | (detached) 当前分支。
    # branch.upstream <upstream_branch> 如果upstream被设置。
    # branch.ab +<ahead> -<behind> 如果上游被设置且
    					 的提交是存在的。
    ------------------------------------------------------------

note: type: Title ^
en: Changed Tracked Entries
zh_HANS-CN: 变更后的跟踪条目

note: type: Plain text
en: Following the headers, a series of lines are printed for tracked entries.  One of three different line formats may be used to describe an entry depending on the type of change.  Tracked entries are printed in an undefined order; parsers should allow for a mixture of the 3 line types in any order.
zh_HANS-CN: 在页眉之后，一系列的行被打印出来，用于追踪条目。  根据变化的类型，三种不同的行格式之一可用于描述一个条目。  追踪条目是以未定义的顺序打印的；解析器应允许以任何顺序混合使用这三种行类型。

note: type: Plain text
en: Ordinary changed entries have the following format:
zh_HANS-CN: 普通更改的条目有以下格式。

note: type: Plain text
en: Renamed or copied entries have the following format:
zh_HANS-CN: 重命名或复制的条目有以下格式。

note: type: delimited block .
en: Field       Meaning
    --------------------------------------------------------
    <XY>        A 2 character field containing the staged and
    	    unstaged XY values described in the short format,
    	    with unchanged indicated by a "." rather than
    	    a space.
    <sub>       A 4 character field describing the submodule state.
    	    "N..." when the entry is not a submodule.
    	    "S<c><m><u>" when the entry is a submodule.
    	    <c> is "C" if the commit changed; otherwise ".".
    	    <m> is "M" if it has tracked changes; otherwise ".".
    	    <u> is "U" if there are untracked changes; otherwise ".".
    <mH>        The octal file mode in HEAD.
    <mI>        The octal file mode in the index.
    <mW>        The octal file mode in the worktree.
    <hH>        The object name in HEAD.
    <hI>        The object name in the index.
    <X><score>  The rename or copy score (denoting the percentage
    	    of similarity between the source and target of the
    	    move or copy). For example "R100" or "C75".
    <path>      The pathname.  In a renamed/copied entry, this
    	    is the target path.
    <sep>       When the `-z` option is used, the 2 pathnames are separated
    	    with a NUL (ASCII 0x00) byte; otherwise, a tab (ASCII 0x09)
    	    byte separates them.
    <origPath>  The pathname in the commit at HEAD or in the index.
    	    This is only present in a renamed/copied entry, and
    	    tells where the renamed/copied contents came from.
    --------------------------------------------------------
zh_HANS-CN: 领域含义
    --------------------------------------------------------
    <XY> 一个2个字符的字段，包含短格式中描述的阶段性和非阶段性XY值。
    	    阶段性和非阶段性的XY值。
    	    不变的用". "表示，而不是用空格。
    	    而不是空格。
    <sub> 一个4个字符的字段，描述子模块的状态。
    	    "N... "当条目不是一个子模块时。
    	    "S<c><m><u>" 当条目是一个子模块。
    	    <c>是 "C"，如果提交改变了；否则是"."。
    	    <m> 如果它有跟踪的变化，则为 "M"；否则为"."。
    	    <u> 如果有未追踪的修改，则为 "U"；否则为"."。
    <mH> HEAD中的八进制文件模式。
    <mI> 索引中的八进制文件模式。
    <mW> 工作树中的八进制文件模式。
    <hH> HEAD中的对象名称。
    <hI> 索引中的对象名称。
    <X><score> 重命名或复制分数（表示源文件和目标文件之间的相似百分比）。
    	    源和目标之间的相似度）。
    	    移动或复制的目标之间的相似度）。)例如，"R100 "或 "C75"。
    <path> 路径名。  在一个重命名/复制的条目中，这
    	    是目标路径。
    <sep> 当使用`-z`选项时，两个路径名用NUL(ASCII 0x00)分隔。
    	    用一个NUL(ASCII 0x00)字节分开；否则，用一个TAB(ASCII 0x09)
    	    字节来分隔它们。
    <origPath> 在HEAD或索引中提交的路径名。
    	    这只存在于重命名/复制的条目中，并且
    	    告诉你重命名/复制的内容来自哪里。
    --------------------------------------------------------

note: type: Plain text
en: Unmerged entries have the following format; the first character is a "u" to distinguish from ordinary changed entries.
zh_HANS-CN: 未合并的条目有以下格式；第一个字符是 "u"，以区别于普通的变更条目。

note: type: delimited block .
en: Field       Meaning
    --------------------------------------------------------
    <XY>        A 2 character field describing the conflict type
    	    as described in the short format.
    <sub>       A 4 character field describing the submodule state
    	    as described above.
    <m1>        The octal file mode in stage 1.
    <m2>        The octal file mode in stage 2.
    <m3>        The octal file mode in stage 3.
    <mW>        The octal file mode in the worktree.
    <h1>        The object name in stage 1.
    <h2>        The object name in stage 2.
    <h3>        The object name in stage 3.
    <path>      The pathname.
    --------------------------------------------------------
zh_HANS-CN: 领域含义
    --------------------------------------------------------
    <XY> 一个2个字符的字段，描述冲突类型
    	    描述冲突类型。
    <sub> 一个4个字符的字段，描述子模块的状态
    	    如上所述。
    <m1> 阶段1中的八进制文件模式。
    <m2> 阶段2中的八进制文件模式。
    <m3> 阶段3中的八进制文件模式。
    <mW> 工作树中的八进制文件模式。
    <h1> 阶段1中的对象名称。
    <h2> 第二阶段的对象名称。
    <h3> 第三阶段的对象名称。
    <path> 路径名。
    --------------------------------------------------------

note: type: Title ^
en: Other Items
zh_HANS-CN: 其他项目

note: type: Plain text
en: Following the tracked entries (and if requested), a series of lines will be printed for untracked and then ignored items found in the worktree.
zh_HANS-CN: 在跟踪的条目之后（如果要求的话），将打印一系列未跟踪的行，然后是在工作树中发现的忽略的条目。

note: type: Plain text
en: Untracked items have the following format:
zh_HANS-CN: 未跟踪的项目有以下格式。

note: type: Plain text
en:     ? <path>
zh_HANS-CN:     ?<路径>

note: type: Plain text
en: Ignored items have the following format:
zh_HANS-CN: 被忽略的项目有以下格式。

note: type: Plain text
en:     ! <path>
zh_HANS-CN:     !<路径>的情况下

note: type: Title ^
en: Pathname Format Notes and -z
zh_HANS-CN: 路径名格式说明和-z

note: type: Plain text
en: When the `-z` option is given, pathnames are printed as is and without any quoting and lines are terminated with a NUL (ASCII 0x00)  byte.
zh_HANS-CN: 当给定"-z "选项时，路径名将按原样打印，没有任何引号，并且以NUL（ASCII 0x00）字节结束行。

note: type: Plain text
en: Without the `-z` option, pathnames with "unusual" characters are quoted as explained for the configuration variable `core.quotePath` (see linkgit:git-config[1]).
zh_HANS-CN: 如果没有`-z`选项，带有 "不寻常 "字符的路径名将被引用，正如对配置变量`core.quotePath`的解释（见linkgit:git-config[1]）。

note: type: Plain text
en: The command honors `color.status` (or `status.color` -- they mean the same thing and the latter is kept for backward compatibility) and `color.status.<slot>` configuration variables to colorize its output.
zh_HANS-CN: 该命令使用`color.status`（或`status.color`--它们的意思是一样的，为了向后兼容，保留后者）和`color.status.<slot>`配置变量来为其输出着色。

note: type: Plain text
en: If the config variable `status.relativePaths` is set to false, then all paths shown are relative to the repository root, not to the current directory.
zh_HANS-CN: 如果配置变量`status.relativePaths`被设置为false，那么所有显示的路径都是相对于版本库根目录的，而不是当前目录。

note: type: Plain text
en: If `status.submoduleSummary` is set to a non zero number or true (identical to -1 or an unlimited number), the submodule summary will be enabled for the long format and a summary of commits for modified submodules will be shown (see --summary-limit option of linkgit:git-submodule[1]). Please note that the summary output from the status command will be suppressed for all submodules when `diff.ignoreSubmodules` is set to 'all' or only for those submodules where `submodule.<name>.ignore=all`. To also view the summary for ignored submodules you can either use the --ignore-submodules=dirty command line option or the 'git submodule summary' command, which shows a similar output but does not honor these settings.
zh_HANS-CN: 如果`status.submoduleSummary`被设置为一个非零的数字或true（与-1或无限制的数字相同），子模块摘要将启用长格式，并显示修改的子模块的提交摘要（见linkgit:git-submodule[1]的-summary-limit选项）。请注意，当`diff.ignoreSubmodules`被设置为'all'或仅为那些`submodule.<name>.ignore=all'的子模块，状态命令的摘要输出将被抑制。要查看被忽略的子模块的摘要，你可以使用 --ignore-submodules=dirty 命令行选项或 "git submodule summary "命令，它显示类似的输出，但不尊重这些设置。

note: type: Title -
en: BACKGROUND REFRESH
zh_HANS-CN: 背景刷新

note: type: Plain text
en: By default, `git status` will automatically refresh the index, updating the cached stat information from the working tree and writing out the result. Writing out the updated index is an optimization that isn't strictly necessary (`status` computes the values for itself, but writing them out is just to save subsequent programs from repeating our computation). When `status` is run in the background, the lock held during the write may conflict with other simultaneous processes, causing them to fail. Scripts running `status` in the background should consider using `git --no-optional-locks status` (see linkgit:git[1] for details).
zh_HANS-CN: 默认情况下，`git status`会自动刷新索引，更新工作树上缓存的状态信息，并将结果写出来。写出更新的索引是一种优化，严格来说并无必要（`status`为自己计算数值，但写出它们只是为了避免后续程序重复我们的计算）。当`status`在后台运行时，在写入过程中持有的锁可能与其他同时进行的进程发生冲突，导致它们失败。在后台运行`status`的脚本应该考虑使用`git --no-optional-locks status`（详见linkgit:git[1]）。

note: type: Labeled list
en: --authors-file=<filename>
zh_HANS-CN: --Patrick Guerrero=<jcs.pattystackzz@gmail.com>

note: type: Plain text
en: Syntax is compatible with the file used by 'git cvsimport' but an empty email address can be supplied with '<>':
zh_HANS-CN: Syntax is compatible with the file used by 'git cvsimport' but an empty email address can be supplied with '<jcs.pattystackzz@gmail.com>':

note: type: delimited block -
en: 	loginname = Joe User <user@example.com>
zh_HANS-CN: 	loginname =Stackzcryp<jcs.pattystackzz@gmail.com>

note: type: Plain text
en: Git is to some extent character encoding agnostic.
zh_HANS-CN: Git在某种程度上是与字符编码无关的。

note: type: Plain text
en: The contents of the blob objects are uninterpreted sequences of bytes.  There is no encoding translation at the core level.
zh_HANS-CN: blob对象的内容是未经解释的字节序列。  在核心层没有编码转换。

note: type: Plain text
en: Path names are encoded in UTF-8 normalization form C. This applies to tree objects, the index file, ref names, as well as path names in command line arguments, environment variables and config files (`.git/config` (see linkgit:git-config[1]), linkgit:gitignore[5], linkgit:gitattributes[5] and linkgit:gitmodules[5]).
zh_HANS-CN: 路径名以UTF-8规范化形式C编码，这适用于树对象、索引文件、参考名称，以及命令行参数、环境变量和配置文件（`.git/config`（见linkgit:git-config[1]），linkgit:gitignore[5]，linkgit:gitattributes[5] 和linkgit:gitmodules[5]）中的路径名。

note: type: Plain text
en: Note that Git at the core level treats path names simply as sequences of non-NUL bytes, there are no path name encoding conversions (except on Mac and Windows). Therefore, using non-ASCII path names will mostly work even on platforms and file systems that use legacy extended ASCII encodings. However, repositories created on such systems will not work properly on UTF-8-based systems (e.g. Linux, Mac, Windows) and vice versa.  Additionally, many Git-based tools simply assume path names to be UTF-8 and will fail to display other encodings correctly.
zh_HANS-CN: 请注意，Git 在核心层将路径名简单地视为非 NUL 字节的序列，没有路径名编码的转换（除了 Mac 和 Windows）。因此，即使在使用传统的扩展ASCII编码的平台和文件系统上，使用非ASCII的路径名大多也能工作。然而，在这种系统上创建的仓库在基于UTF-8的系统（如Linux、Mac、Windows）上将无法正常工作，反之亦然。  此外，许多基于Git的工具简单地认为路径名称是UTF-8，而不能正确显示其他编码。

note: type: Plain text
en: Commit log messages are typically encoded in UTF-8, but other extended ASCII encodings are also supported. This includes ISO-8859-x, CP125x and many others, but _not_ UTF-16/32, EBCDIC and CJK multi-byte encodings (GBK, Shift-JIS, Big5, EUC-x, CP9xx etc.).
zh_HANS-CN: 提交日志信息通常以UTF-8编码，但也支持其他扩展ASCII编码。这包括ISO-8859-x、CP125x和其他许多编码，但不包括UTF-16/32、EBCDIC和CJK多字节编码（GBK、Shift-JIS、Big5、EUC-x、CP9xx等）。

note: type: Plain text
en: Although we encourage that the commit log messages are encoded in UTF-8, both the core and Git Porcelain are designed not to force UTF-8 on projects.  If all participants of a particular project find it more convenient to use legacy encodings, Git does not forbid it.  However, there are a few things to keep in mind.
zh_HANS-CN: 尽管我们鼓励提交日志信息使用UTF-8编码，但核心系统和Git Porcelain的设计并不强制要求项目使用UTF-8。  如果某个项目的所有参与者都认为使用传统编码更方便，Git也不会禁止。  然而，有几件事需要注意。

note: type: Plain text
en: 'git commit' and 'git commit-tree' issues a warning if the commit log message given to it does not look like a valid UTF-8 string, unless you explicitly say your project uses a legacy encoding.  The way to say this is to have `i18n.commitEncoding` in `.git/config` file, like this:
zh_HANS-CN: git commit "和 "git commit-tree "如果收到的提交日志信息不像是有效的UTF-8字符串，就会发出警告，除非你明确表示你的项目使用的是传统编码。  说这个的方法是在`.git/config`文件中设置`i18n.commitEncoding`，像这样。

note: type: Plain text
en: Commit objects created with the above setting record the value of `i18n.commitEncoding` in its `encoding` header.  This is to help other people who look at them later.  Lack of this header implies that the commit log message is encoded in UTF-8.
zh_HANS-CN: 用上述设置创建的提交对象在其`encoding`头中记录了`i18n.commitEncoding`的值。  这是为了帮助以后看这些对象的人。  缺少这个头意味着提交日志信息是以UTF-8编码的。

note: type: Plain text
en: If you do not have this configuration variable, the value of `i18n.commitEncoding` is used instead.
zh_HANS-CN: 如果你没有这个配置变量，则使用`i18n.commitEncoding`的值来代替。

note: type: Plain text
en: Note that we deliberately chose not to re-code the commit log message when a commit is made to force UTF-8 at the commit object level, because re-coding to UTF-8 is not necessarily a reversible operation.
zh_HANS-CN: 请注意，我们特意选择在提交对象层面上，不对提交日志信息进行重新编码，因为重新编码为UTF-8不一定是一个可逆的操作。

note: type: Plain text
en: '<start>' and '<end>' can take one of these forms:
zh_HANS-CN: '<开始>'和'<结束>'可以采取这些形式之一。

note: type: Plain text
en: If '<start>' or '<end>' is a number, it specifies an absolute line number (lines count from 1).
zh_HANS-CN: 如果'<开始>'或'<结束>'是一个数字，它指定了一个绝对行数（行数从1开始计算）。

note: type: Plain text
en: This form will use the first line matching the given POSIX regex. If '<start>' is a regex, it will search from the end of the previous `-L` range, if any, otherwise from the start of file.  If '<start>' is `^/regex/`, it will search from the start of file.  If '<end>' is a regex, it will search starting at the line given by '<start>'.
zh_HANS-CN: 这种形式将使用与给定的POSIX regex匹配的第一行。如果'<start>'是一个重词，它将从前一个`-L'范围的末尾开始搜索，如果有的话，则从文件的开始。  如果'<start>'是`^/regex/`，它将从文件的开始搜索。  如果'<end>'是一个regex，它将从'<start>'所给的行开始搜索。

note: type: Plain text
en: +offset or -offset
zh_HANS-CN: +offset或-offset

note: type: Plain text
en: This is only valid for '<end>' and will specify a number of lines before or after the line given by '<start>'.
zh_HANS-CN: 这只对'<end>'有效，将指定'<start>'所给的行前或行后的数量。

note: type: Plain text
en: If `:<funcname>` is given in place of '<start>' and '<end>', it is a regular expression that denotes the range from the first funcname line that matches '<funcname>', up to the next funcname line. `:<funcname>` searches from the end of the previous `-L` range, if any, otherwise from the start of file. `^:<funcname>` searches from the start of file. The function names are determined in the same way as `git diff` works out patch hunk headers (see 'Defining a custom hunk-header' in linkgit:gitattributes[5]).
zh_HANS-CN: 如果`:<funcname>`代替了'<start>'和'<end>'，它是一个正则表达式，表示从第一个匹配'<funcname>'的funcname行开始，直到下一个funcname行的范围。`:<funcname>`从上一个`-L'范围的末尾开始搜索，如果有的话，则从文件的开始搜索。`^:<funcname>`从文件的开始搜索。函数名的确定方式与 `git diff`确定补丁组头的方式相同（见 linkgit:gitattributes[5] 中的'定义自定义组头'）。

note: type: Plain text
en: Trace the evolution of the line range given by '<start>,<end>', or by the function name regex '<funcname>', within the '<file>'. You may not give any pathspec limiters.  This is currently limited to a walk starting from a single revision, i.e., you may only give zero or one positive revision arguments, and '<start>' and '<end>' (or '<funcname>') must exist in the starting revision.  You can specify this option more than once. Implies `--patch`.  Patch output can be suppressed using `--no-patch`, but other diff formats (namely `--raw`, `--numstat`, `--shortstat`, `--dirstat`, `--summary`, `--name-only`, `--name-status`, `--check`) are not currently implemented.
zh_HANS-CN: 追踪由'<start>,<end>'给出的行的范围，或由函数名称重合词'<funcname>'给出的行的演变，在'<file>'中。你不能给出任何pathspec限制条件。  目前这只限于从一个修订版开始的行走，也就是说，你只能给出零或一个正的修订版参数，而且'<start>'和'<end>'（或'<funcname>'）必须存在于起始修订版中。  你可以多次指定这个选项。  补丁输出可以用`--no-patch`来抑制，但其他差异格式（即`--raw`、`-numstat`、`-shortstat`、`-dirstat`、`-summary`、`-name-only`、`-name-status`、`-check`）目前没有实现。

note: type: Plain text
en: THIS OPTION IS EXPERIMENTAL! SHA-256 support is experimental and still in an early stage.  A SHA-256 repository will in general not be able to share work with "regular" SHA-1 repositories.  It should be assumed that, e.g., Git internal file formats in relation to SHA-256 repositories may change in backwards-incompatible ways.  Only use `--object-format=sha256` for testing purposes.
zh_HANS-CN: 此选项是实验性的！SHA-256 支持是实验性的，仍然处于早期阶段。一般来说，SHA-256 仓库不能与 "常规" SHA-1 仓库共同工作。应该假定，例如，与 SHA-256 仓库有关的 Git 内部文件格式可能会以向后不兼容的方式改变。仅在测试时使用 `--object-format=sha256` 选项。

note: type: Title -
en: PRETTY FORMATS
zh_HANS-CN: 漂亮的格式

note: type: Plain text
en: If the commit is a merge, and if the pretty-format is not 'oneline', 'email' or 'raw', an additional line is inserted before the 'Author:' line.  This line begins with "Merge: " and the hashes of ancestral commits are printed, separated by spaces.  Note that the listed commits may not necessarily be the list of the *direct* parent commits if you have limited your view of history: for example, if you are only interested in changes related to a certain directory or file.
zh_HANS-CN: 如果提交是一个合并，并且如果pretty-format不是 "oneline"、"email "或 "raw"，那么在 "Author: "一行之前会插入一个附加行。  这一行的开头是 "Merge:这一行以 "Merge: "开头，并打印出祖先提交的哈希值，用空格分隔。  请注意，如果你限制了你的历史视图，那么列出的提交不一定是*直接*父级提交的列表：例如，如果你只对与某个目录或文件有关的修改感兴趣。

note: type: Plain text
en: There are several built-in formats, and you can define additional formats by setting a pretty.<name> config option to either another format name, or a 'format:' string, as described below (see linkgit:git-config[1]). Here are the details of the built-in formats:
zh_HANS-CN: 有几种内置的格式，你可以通过将 pretty.<name> 配置选项设置为另一种格式名称或 "format: "字符串来定义额外的格式，如下所述（见 linkgit:git-config[1] ）。下面是内置格式的细节。

note: type: Plain text
en: This is designed to be as compact as possible.
zh_HANS-CN: 这个设计是为了尽可能的紧凑。

note: type: Plain text
en: commit <hash>
    Author: <author>
zh_HANS-CN: 承诺<hash>
    作者。<作者>的情况

note: type: Plain text
en: commit <hash>
    Author: <author>
    Date:   <author date>
zh_HANS-CN: 承诺<hash>
    作者。<作者>的情况
    日期。   <作者>日期

note: type: Plain text
en: <full commit message>
zh_HANS-CN: <完整的提交信息

note: type: Plain text
en: commit <hash>
    Author: <author>
    Commit: <committer>
zh_HANS-CN: 承诺<hash>
    作者。< Author>
    承诺。<committer>（提交者）。

note: type: Plain text
en: commit <hash>
    Author:     <author>
    AuthorDate: <author date>
    Commit:     <committer>
    CommitDate: <committer date>
zh_HANS-CN: 承诺<hash>
    作者。     <作者>的情况
    作者日期。<作者日期>。
    承诺。     <承诺者>
    提交日期。<提交者日期>

note: type: Plain text
en: <abbrev hash> (<title line>, <short author date>)
zh_HANS-CN: <abbrev hash>（<标题行>，<简短的作者日期>）。

note: type: Plain text
en: This format is used to refer to another commit in a commit message and is the same as `--pretty='format:%C(auto)%h (%s, %ad)'`.  By default, the date is formatted with `--date=short` unless another `--date` option is explicitly specified.  As with any `format:` with format placeholders, its output is not affected by other options like `--decorate` and `--walk-reflogs`.
zh_HANS-CN: 这种格式用于在提交信息中引用另一个提交，与`--pretty='format:%C(auto)%h (%s, %ad)'相同。  默认情况下，日期的格式为`--date=short`，除非明确指定其他`--date`选项。  与任何带有格式占位符的`format:`一样，其输出不受其他选项的影响，如`--decorate`和`--walk-reflogs`。

note: type: Plain text
en: From <hash> <date>
    From: <author>
    Date: <author date>
    Subject: [PATCH] <title line>
zh_HANS-CN: 来自<hash><date>的信息
    来自。<作者
    日期。<作者>日期
    主题。[PATCH] <标题行

note: type: Plain text
en: Like 'email', but lines in the commit message starting with "From " (preceded by zero or more ">") are quoted with ">" so they aren't confused as starting a new commit.
zh_HANS-CN: 和 "email "一样，但提交信息中以 "From "开头的行（前面有零个或多个">"）用">"引出，这样就不会被混淆为开始了一个新的提交。

note: type: Plain text
en: The 'raw' format shows the entire commit exactly as stored in the commit object.  Notably, the hashes are displayed in full, regardless of whether --abbrev or --no-abbrev are used, and 'parents' information show the true parent commits, without taking grafts or history simplification into account. Note that this format affects the way commits are displayed, but not the way the diff is shown e.g. with `git log --raw`. To get full object names in a raw diff format, use `--no-abbrev`.
zh_HANS-CN: 原始 "格式显示的是整个提交对象中存储的内容。  值得注意的是，无论是否使用了 --abbrev 或 --no-abbrev，哈希值都会被完整地显示出来，而'parent'信息会显示真正的父级提交，不会考虑移花接木或历史简化。注意，这种格式会影响提交的显示方式，但不会影响diff的显示方式，比如用`git log --raw`来显示。要获得原始差异格式的完整对象名称，请使用`--no-abbrev`。

note: type: Plain text
en: The 'format:<string>' format allows you to specify which information you want to show. It works a little bit like printf format, with the notable exception that you get a newline with '%n' instead of '\n'.
zh_HANS-CN: format:<string>"格式允许你指定你想显示的信息。它的工作原理有点像printf格式，值得注意的是，你得到的换行是'%n'而不是'\n'。

note: type: Plain text
en: E.g, 'format:"The author of %h was %an, %ar%nThe title was >>%s<<%n"' would show something like this:
zh_HANS-CN: 例如，'format: "The author of %h was %an, %ar%nThe title was >>%s<<%n"'会显示这样的内容。

note: type: delimited block -
en: The author of fe6e0ee was Junio C Hamano, 23 hours ago
    The title was >>t4119: test autocomputing -p<n> for traditional diff input.<<
zh_HANS-CN: fe6e0ee的作者是Junio C Hamano, 23小时前
    标题是 >>t4119: 测试传统diff输入的自动计算-p<n>。

note: type: Plain text
en: The placeholders are:
zh_HANS-CN: 占位符是。

note: type: Plain text
en: Placeholders that expand to a single literal character:
zh_HANS-CN: 占位符，可扩展为一个字面字符。

note: type: Plain text
en: newline
zh_HANS-CN: 换行

note: type: Plain text
en: a raw '%'
zh_HANS-CN: 一个原始的'%'

note: type: Plain text
en: print a byte from a hex code
zh_HANS-CN: 打印十六进制代码中的一个字节

note: type: Plain text
en: Placeholders that affect formatting of later placeholders:
zh_HANS-CN: 影响后面占位符的格式化的占位符。

note: type: Plain text
en: switch color to red
zh_HANS-CN: 切换颜色为红色

note: type: Plain text
en: switch color to green
zh_HANS-CN: 切换颜色为绿色

note: type: Plain text
en: switch color to blue
zh_HANS-CN: 将颜色改为蓝色

note: type: Plain text
en: reset color
zh_HANS-CN: 重置颜色

note: type: Plain text
en: color specification, as described under Values in the "CONFIGURATION FILE" section of linkgit:git-config[1].  By default, colors are shown only when enabled for log output (by `color.diff`, `color.ui`, or `--color`, and respecting the `auto` settings of the former if we are going to a terminal). `%C(auto,...)` is accepted as a historical synonym for the default (e.g., `%C(auto,red)`). Specifying `%C(always,...)` will show the colors even when color is not otherwise enabled (though consider just using `--color=always` to enable color for the whole output, including this format and anything else git might color).  `auto` alone (i.e. `%C(auto)`) will turn on auto coloring on the next placeholders until the color is switched again.
zh_HANS-CN: 颜色规范，如linkgit:git-config[1]的 "配置文件 "部分中的数值描述。  默认情况下，只有在启用日志输出时才会显示颜色（通过 `color.diff`, `color.ui`, 或 `-color`, 如果我们要去终端，要尊重前者的`auto`设置）。`%C(auto,...)`被接受为默认的历史同义词（例如，`%C(auto,red)`）。指定`%C(always,...)`将显示颜色，即使没有启用颜色（尽管考虑使用`-color=always`来启用整个输出的颜色，包括这个格式和其他任何git可能的颜色）。  `auto`单独使用（即`%C(auto)`）将在下一个占位符上开启自动着色，直到再次切换颜色。

note: type: Plain text
en: left (`<`), right (`>`) or boundary (`-`) mark
zh_HANS-CN: 左（`<`）、右（`>`）或边界（`-`）标记

note: type: Plain text
en: switch line wrapping, like the -w option of linkgit:git-shortlog[1].
zh_HANS-CN: 开关包行，就像 linkgit:git-shortlog[1] 的 -w 选项。

note: type: Plain text
en: make the next placeholder take at least N columns, padding spaces on the right if necessary.  Optionally truncate at the beginning (ltrunc), the middle (mtrunc) or the end (trunc) if the output is longer than N columns.  Note that truncating only works correctly with N >= 2.
zh_HANS-CN: 使下一个占位符至少占用N列，必要时在右边填充空格。  如果输出超过N列，可以选择在开头（ltrunc）、中间（mtrunc）或结尾（trunc）进行截断。  注意，只有在N>=2的情况下，截断才会正常工作。

note: type: Plain text
en: make the next placeholder take at least until Nth columns, padding spaces on the right if necessary
zh_HANS-CN: 使下一个占位符至少到第N列，必要时在右边填充空格

note: type: Plain text
en: similar to '%>(<N>)', '%>|(<N>)' respectively, except that if the next placeholder takes more spaces than given and there are spaces on its left, use those spaces
zh_HANS-CN: 分别类似于'%>(<N>)'、'%>|(<N>)'，只是如果下一个占位符占用的空间比给定的多，并且其左侧有空格，则使用这些空格。

note: type: Plain text
en: Placeholders that expand to information extracted from the commit:
zh_HANS-CN: 占位符，扩展到从提交中提取的信息。

note: type: Plain text
en: abbreviated commit hash
zh_HANS-CN: 简称提交哈希

note: type: Plain text
en: abbreviated tree hash
zh_HANS-CN: 简称树形哈希

note: type: Plain text
en: parent hashes
zh_HANS-CN: 父类哈希值

note: type: Plain text
en: abbreviated parent hashes
zh_HANS-CN: 缩写的父母哈希值

note: type: Plain text
en: author email local-part (the part before the '@' sign)
zh_HANS-CN: 作者电子邮件的本地部分（"@"符号之前的部分）。

note: type: Plain text
en: author date (format respects --date= option)
zh_HANS-CN: 作者日期（格式尊重--date=选项

note: type: Plain text
en: author date, RFC2822 style
zh_HANS-CN: 作者日期，RFC2822风格

note: type: Plain text
en: author date, relative
zh_HANS-CN: 作者日期，相对

note: type: Plain text
en: author date, UNIX timestamp
zh_HANS-CN: 作者日期，UNIX时间戳

note: type: Plain text
en: author date, ISO 8601-like format
zh_HANS-CN: 作者日期，类似ISO 8601的格式

note: type: Plain text
en: author date, strict ISO 8601 format
zh_HANS-CN: 作者日期，严格的ISO 8601格式

note: type: Plain text
en: author date, short format (`YYYY-MM-DD`)
zh_HANS-CN: 作者日期，短格式（`YYYY-MM-DD`）。

note: type: Plain text
en: author date, human style (like the `--date=human` option of linkgit:git-rev-list[1])
zh_HANS-CN: 作者日期，人类风格（就像linkgit:git-rev-list[1]的`--date=human`选项）。

note: type: Plain text
en: committer email local-part (the part before the '@' sign)
zh_HANS-CN: 承诺人电子邮件的本地部分（"@"符号之前的部分）。

note: type: Plain text
en: committer date (format respects --date= option)
zh_HANS-CN: 承诺人日期（格式尊重--date=选项

note: type: Plain text
en: committer date, RFC2822 style
zh_HANS-CN: 承诺人日期，RFC2822风格

note: type: Plain text
en: committer date, relative
zh_HANS-CN: 承诺人日期，相对

note: type: Plain text
en: committer date, UNIX timestamp
zh_HANS-CN: 提交者日期，UNIX时间戳

note: type: Plain text
en: committer date, ISO 8601-like format
zh_HANS-CN: 承诺人日期，类似ISO 8601的格式

note: type: Plain text
en: committer date, strict ISO 8601 format
zh_HANS-CN: 承诺人日期，严格的ISO 8601格式

note: type: Plain text
en: committer date, short format (`YYYY-MM-DD`)
zh_HANS-CN: 承诺人日期，短格式（`YYYY-MM-DD`）。

note: type: Plain text
en: committer date, human style (like the `--date=human` option of linkgit:git-rev-list[1])
zh_HANS-CN: 提交者的日期，人类风格（就像linkgit:git-rev-list[1]的`--date=human`选项）。

note: type: Plain text
en: ref names, like the --decorate option of linkgit:git-log[1]
zh_HANS-CN: ref名称，就像linkgit:git-log[1]的-decorate选项。

note: type: Plain text
en: ref names without the " (", ")" wrapping.
zh_HANS-CN: 没有"（"、"）"包装的参考文献名称。

note: type: Labeled list
en: '%(describe[:options])'
zh_HANS-CN: '%(description[:options])'

note: type: Plain text
en: human-readable name, like linkgit:git-describe[1]; empty string for undescribable commits.  The `describe` string may be followed by a colon and zero or more comma-separated options.  Descriptions can be inconsistent when tags are added or removed at the same time.
zh_HANS-CN: 人类可读的名字，像linkgit:git-describe[1]；空字符串表示不可描述的提交。  `describe`字符串后面可以有冒号和零个或多个逗号分隔的选项。  当标签同时被添加或删除时，描述可能不一致。

note: type: Plain text
en: 'match=<pattern>': Only consider tags matching the given `glob(7)` pattern, excluding the "refs/tags/" prefix.
zh_HANS-CN: 'match=<pattern>':只考虑与给定的`glob(7)`模式匹配的标签，不包括 "refs/tags/"前缀。

note: type: Plain text
en: 'exclude=<pattern>': Do not consider tags matching the given `glob(7)` pattern, excluding the "refs/tags/" prefix.
zh_HANS-CN: 'exclude=<pattern>':不考虑匹配给定`glob(7)`模式的标签，排除 "refs/tags/"前缀。

note: type: Plain text
en: ref name given on the command line by which the commit was reached (like `git log --source`), only works with `git log`
zh_HANS-CN: 在命令行中给出的提交名称（如`git log --source`），只对`git log`起作用。

note: type: Plain text
en: sanitized subject line, suitable for a filename
zh_HANS-CN: 经过消毒的主题行，适合于文件名

note: type: Plain text
en: raw body (unwrapped subject and body)
zh_HANS-CN: 原始体（未包装的主题和体）。

note: type: Plain text
en: commit notes
zh_HANS-CN: 承诺说明

note: type: Plain text
en: raw verification message from GPG for a signed commit
zh_HANS-CN: 来自GPG的签名提交的原始验证信息

note: type: Plain text
en: show "G" for a good (valid) signature, "B" for a bad signature, "U" for a good signature with unknown validity, "X" for a good signature that has expired, "Y" for a good signature made by an expired key, "R" for a good signature made by a revoked key, "E" if the signature cannot be checked (e.g. missing key)  and "N" for no signature
zh_HANS-CN: 显示 "G "代表一个好的（有效的）签名，"B "代表一个坏的签名，"U "代表一个有效性未知的好的签名，"X "代表一个已经过期的好的签名，"Y "代表一个由过期的钥匙制作的好的签名，"R "代表一个由撤销的钥匙制作的好的签名，"E "如果不能检查签名（如缺少钥匙），"N "代表没有签名。

note: type: Plain text
en: show the name of the signer for a signed commit
zh_HANS-CN: 显示已签名的提交的签名者的名字

note: type: Plain text
en: show the key used to sign a signed commit
zh_HANS-CN: 显示用于签署已签名的承诺的密钥

note: type: Plain text
en: show the fingerprint of the key used to sign a signed commit
zh_HANS-CN: 显示用于签署已签名提交文件的密钥的指纹。

note: type: Plain text
en: show the fingerprint of the primary key whose subkey was used to sign a signed commit
zh_HANS-CN: 显示主键的指纹，该主键的子键被用来签署一个已签署的提交。

note: type: Plain text
en: show the trust level for the key used to sign a signed commit
zh_HANS-CN: 显示用于签署已签名的承诺的密钥的信任级别

note: type: Plain text
en: reflog selector, e.g., `refs/stash@{1}` or `refs/stash@{2 minutes ago}`; the format follows the rules described for the `-g` option. The portion before the `@` is the refname as given on the command line (so `git log -g refs/heads/master` would yield `refs/heads/master@{0}`).
zh_HANS-CN: reflog选择器，例如，`refs/stash@{1}`或`refs/stash@{2分钟前}`；其格式遵循`-g`选项的规则。`@'前面的部分是命令行上给出的参考文献名称（所以`git log -g refs/heads/master`会产生`refs/heads/master@{0}`）。

note: type: Plain text
en: shortened reflog selector; same as `%gD`, but the refname portion is shortened for human readability (so `refs/heads/master` becomes just `master`).
zh_HANS-CN: 简化的 reflog 选择器；与 `%gD` 相同，但 refname 部分被缩短以利于人类阅读（因此 `refs/heads/master` 变成了 `master`）。

note: type: Plain text
en: reflog identity name
zh_HANS-CN: 记录身份名称

note: type: Plain text
en: reflog identity email
zh_HANS-CN: 重新记录身份邮件

note: type: Plain text
en: reflog subject
zh_HANS-CN: 记录主题

note: type: Labeled list
en: '%(trailers[:options])'
zh_HANS-CN: '%(trailer[:options])'

note: type: Plain text
en: display the trailers of the body as interpreted by linkgit:git-interpret-trailers[1]. The `trailers` string may be followed by a colon and zero or more comma-separated options.  If any option is provided multiple times the last occurrence wins.
zh_HANS-CN: 显示由linkgit:git-interpret-trailers[1]解释的正文的预告片。`trailers`字符串后面可以有冒号和零个或多个逗号分隔的选项。  如果任何选项被多次提供，则最后出现的选项获胜。

note: type: Plain text
en: The boolean options accept an optional value `[=<BOOL>]`. The values `true`, `false`, `on`, `off` etc. are all accepted. See the "boolean" sub-section in "EXAMPLES" in linkgit:git-config[1]. If a boolean option is given with no value, it's enabled.
zh_HANS-CN: 布尔选项接受一个可选的值`[=<BOOL>]`。`true`, `false`, `on`, `off`等值都可以接受。参见linkgit:git-config[1]中 "示例 "的 "布尔 "子章节。如果一个布尔选项没有给出值，它就被启用。

note: type: Plain text
en: 'key=<K>': only show trailers with specified key. Matching is done case-insensitively and trailing colon is optional. If option is given multiple times trailer lines matching any of the keys are shown. This option automatically enables the `only` option so that non-trailer lines in the trailer block are hidden. If that is not desired it can be disabled with `only=false`.  E.g., `%(trailers:key=Reviewed-by)` shows trailer lines with key `Reviewed-by`.
zh_HANS-CN: 'key=<K>'：只显示具有指定密钥的拖车。匹配是不分大小写的，后面的冒号是可选的。如果多次给出选项，则显示与任何键匹配的拖车行。该选项自动启用 "only "选项，使拖车块中的非拖车行被隐藏。如果不希望这样，可以用`only=false`禁用。  例如，`%(trailers:key=Reviewed-by)`显示键为`Reviewed-by'的拖车行。

note: type: Plain text
en: 'only[=<BOOL>]': select whether non-trailer lines from the trailer block should be included.
zh_HANS-CN: only[=<BOOL>]"：选择是否应该包括来自拖车块的非拖车行。

note: type: Plain text
en: 'separator=<SEP>': specify a separator inserted between trailer lines. When this option is not given each trailer line is terminated with a line feed character. The string SEP may contain the literal formatting codes described above. To use comma as separator one must use `%x2C` as it would otherwise be parsed as next option. E.g., `%(trailers:key=Ticket,separator=%x2C )` shows all trailer lines whose key is "Ticket" separated by a comma and a space.
zh_HANS-CN: separator=<SEP>'：指定在拖车行之间插入一个分隔符。当没有给出这个选项时，每个拖车行都以换行字符结束。字符串SEP可以包含上述的字面格式化代码。要使用逗号作为分隔符，必须使用`%x2C`，否则它将被解析为下一个选项。例如，`%(trailers:key=Ticket,separator=%x2C )`显示所有密钥为 "Ticket "的拖车行，用逗号和空格分隔。

note: type: Plain text
en: 'unfold[=<BOOL>]': make it behave as if interpret-trailer's `--unfold` option was given. E.g., `%(trailers:only,unfold=true)` unfolds and shows all trailer lines.
zh_HANS-CN: unfold[=<BOOL>]"：使它的行为就像 interpret-trailer 的 `--unfold` 选项被给出一样。例如，`%(trailers:only,unfold=true)`会展开并显示所有的拖车行。

note: type: Plain text
en: 'keyonly[=<BOOL>]': only show the key part of the trailer.
zh_HANS-CN: keyonly[=<BOOL>]"：只显示拖车的关键部分。

note: type: Plain text
en: 'valueonly[=<BOOL>]': only show the value part of the trailer.
zh_HANS-CN: 'valueonly[=<BOOL>]'：只显示拖车的值部分。

note: type: Plain text
en: 'key_value_separator=<SEP>': specify a separator inserted between trailer lines. When this option is not given each trailer key-value pair is separated by ": ". Otherwise it shares the same semantics as 'separator=<SEP>' above.
zh_HANS-CN: 'key_value_separator=<SEP>'：指定在拖车行之间插入一个分隔符。当这个选项没有给出时，每个预告片的键值对都用": "分开。 否则，它的语义与上面的'separator=<SEP>'相同。

note: type: Plain text
en: Some placeholders may depend on other options given to the revision traversal engine. For example, the `%g*` reflog options will insert an empty string unless we are traversing reflog entries (e.g., by `git log -g`). The `%d` and `%D` placeholders will use the "short" decoration format if `--decorate` was not already provided on the command line.
zh_HANS-CN: 一些占位符可能取决于给修订版遍历引擎的其他选项。例如，`%g*` reflog选项将插入一个空字符串，除非我们正在遍历reflog条目（例如，通过`git log -g`）。`%d`和`%D`占位符将使用 "短 "装饰格式，如果`--decorate`没有在命令行上提供。

note: type: Plain text
en: If you add a `+` (plus sign) after '%' of a placeholder, a line-feed is inserted immediately before the expansion if and only if the placeholder expands to a non-empty string.
zh_HANS-CN: 如果你在占位符的'%'后面加了一个`+'（加号），当且仅当占位符扩展为一个非空字符串时，在扩展前会立即插入换行符。

note: type: Plain text
en: If you add a `-` (minus sign) after '%' of a placeholder, all consecutive line-feeds immediately preceding the expansion are deleted if and only if the placeholder expands to an empty string.
zh_HANS-CN: 如果你在占位符的'%'后面加了一个`-'（减号），如果且仅当占位符扩展为空字符串时，紧接着扩展前的所有连续换行将被删除。

note: type: Plain text
en: If you add a ` ` (space) after '%' of a placeholder, a space is inserted immediately before the expansion if and only if the placeholder expands to a non-empty string.
zh_HANS-CN: 如果你在占位符的'%'后面加了一个``（空格），当且仅当占位符扩展到一个非空字符串时，空格就会紧接着插入扩展。

note: type: Plain text
en: The 'tformat:' format works exactly like 'format:', except that it provides "terminator" semantics instead of "separator" semantics. In other words, each commit has the message terminator character (usually a newline) appended, rather than a separator placed between entries.  This means that the final entry of a single-line format will be properly terminated with a new line, just as the "oneline" format does.  For example:
zh_HANS-CN: tformat: "格式的工作原理与 "format: "完全一样，只是它提供了 "终止符 "语义，而不是 "分隔符 "语义。换句话说，每个提交都附加了信息结束符（通常是换行符），而不是在条目之间放置一个分隔符。  这意味着单行格式的最后一个条目将正确地以新行结束，就像 "单行 "格式那样。  比如说

note: type: Plain text
en: In addition, any unrecognized string that has a `%` in it is interpreted as if it has `tformat:` in front of it.  For example, these two are equivalent:
zh_HANS-CN: 此外，任何未被识别的字符串，如果其中有`%`，将被解释为前面有`tformat:`。  例如，这两个是等同的。

note: type: Plain text
en: Pretty-print the contents of the commit logs in a given format, where '<format>' can be one of 'oneline', 'short', 'medium', 'full', 'fuller', 'reference', 'email', 'raw', 'format:<string>' and 'tformat:<string>'.  When '<format>' is none of the above, and has '%placeholder' in it, it acts as if '--pretty=tformat:<format>' were given.
zh_HANS-CN: 以指定的格式打印提交日志的内容，其中'<format>'可以是'oneline'、'short'、'medium'、'full'、'fuller'、'reference'、'email'、'raw'、'format:<string>'和'tformat:<string>'之一。  当'<format>'不是上述任何一种，并且其中有'%placeholder'时，它的作用就像给出'--pretty=tformat:<format>'一样。

note: type: Plain text
en: See the "PRETTY FORMATS" section for some additional details for each format.  When '=<format>' part is omitted, it defaults to 'medium'.
zh_HANS-CN: 参见 "PRETTY FORMATS "部分，了解每种格式的一些额外细节。  当'=<格式>'部分被省略时，它默认为'中等'。

note: type: Plain text
en: Note: you can specify the default pretty format in the repository configuration (see linkgit:git-config[1]).
zh_HANS-CN: 注意：你可以在版本库配置中指定默认的漂亮格式（见linkgit:git-config[1]）。

note: type: Plain text
en: 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.
zh_HANS-CN: 不要显示完整的40字节的十六进制提交对象名称，而是显示一个前缀，以唯一的方式命名该对象。  "--abbrev=<n>"选项可以用来指定前缀的最小长度（如果显示的话，它也会修改diff输出）。

note: type: Plain text
en: This should make "--pretty=oneline" a whole lot more readable for people using 80-column terminals.
zh_HANS-CN: 这应该使"--pretty=oneline "对于使用80列终端的人来说更容易阅读。

note: type: Plain text
en: 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.
zh_HANS-CN: 显示完整的40字节十六进制的提交对象名称。这否定了`--abbrev-commit`，无论是明确的还是由其他选项如"--oneline "暗示的。它还覆盖了`log.abbrevCommit`变量。

note: type: Plain text
en: This is a shorthand for "--pretty=oneline --abbrev-commit" used together.
zh_HANS-CN: 这是"--pretty=oneline --abbrev-commit "的简写，一起使用。

note: type: Plain text
en: 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.
zh_HANS-CN: 在输出中显示之前，在日志信息中进行标签扩展（用足够的空格替换每个标签，以填充到下一个显示列的'<n>'的倍数）。  `--expand-tabs`是`--expand-tabs=8`的简写，`--no-expand-tabs`是`--expand-tabs=0`的简写，它禁止标签扩展。

note: type: Plain text
en: 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').
zh_HANS-CN: 默认情况下，标签会以漂亮的格式展开，将日志信息缩进4个空格（即 "中"，这是默认的，"全"，和 "更全"）。

note: type: Plain text
en: Show the notes (see linkgit: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.
zh_HANS-CN: 在显示提交日志信息时，显示注释提交的说明（见linkgit:git-notes[1]）。  这是`git log`、`git show`和`git whatchanged`命令的默认设置，当命令行中没有给出`--pretty`、`--format`或`--oneline`选项时。

note: type: Plain text
en: By default, the notes shown are from the notes refs listed in the `core.notesRef` and `notes.displayRef` variables (or corresponding environment overrides). See linkgit:git-config[1] for more details.
zh_HANS-CN: 默认情况下，显示的注释来自于`core.notesRef`和`notes.displayRef`变量（或相应的环境覆盖）中列出的注释参考。更多细节见linkgit:git-config[1]。

note: type: Plain text
en: 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.
zh_HANS-CN: 有了一个可选的'<ref>'参数，就可以使用ref来寻找要显示的笔记。  当ref以`refs/notes/`开头时，可以指定完整的ref名称；当它以`notes/`开头时，`refs/`，否则`refs/notes/`前缀，形成ref的全名。

note: type: Plain text
en: 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).
zh_HANS-CN: 多个--音符选项可以组合起来，控制哪些音符被显示。例如。"--notes=foo "将只显示来自 "refs/notes/foo "的注释；"--notes=foo --notes "将同时显示来自 "refs/notes/foo "和默认注释的注释。

note: type: Plain text
en: 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".
zh_HANS-CN: 不显示注释。这否定了上面的`--notes`选项，因为它重新设置了显示注释的注释列表。  选项按照命令行给出的顺序进行解析，因此，例如"--notes --notes=foo --no-notes --notes=bar "将只显示来自 "refs/notes/bar "的注释。

note: type: Plain text
en: These options are deprecated. Use the above --notes/--no-notes options instead.
zh_HANS-CN: 这些选项已被废弃。请使用上面的 --notes/-no-notes 选项来代替。

note: type: Plain text
en: Check the validity of a signed commit object by passing the signature to `gpg --verify` and show the output.
zh_HANS-CN: 通过将签名传递给 `gpg --verify` 来检查已签名的提交对象的有效性，并显示输出。

note: type: Plain text
en: When combining multiple `--contains` and `--no-contains` filters, only references that contain at least one of the `--contains` commits and contain none of the `--no-contains` commits are shown.
zh_HANS-CN: 当组合多个"---包含 "和"---不包含 "过滤器时，只显示至少包含一个"---包含 "的提交，并且不包含"---不包含 "的提交的参考。

note: type: Plain text
en: When combining multiple `--merged` and `--no-merged` filters, only references that are reachable from at least one of the `--merged` commits and from none of the `--no-merged` commits are shown.
zh_HANS-CN: 当结合多个 "合并 "和 "未合并 "过滤器时，只显示至少有一个 "合并 "提交和没有 "未合并 "提交的引用。

note: type: Plain text
en: List commits that are reachable by following the `parent` links from the given commit(s), but exclude commits that are reachable from the one(s)  given with a '{caret}' in front of them.  The output is given in reverse chronological order by default.
zh_HANS-CN: 列出可以从给定的提交中通过 "父 "链接到达的提交，但不包括可以从前面有"{caret}"的提交中到达的提交。  默认情况下，输出结果是按时间顺序倒置的。

note: type: Plain text
en: You can think of this as a set operation. Commits reachable from any of the commits given on the command line form a set, and then commits reachable from any of the ones given with '{caret}' in front are subtracted from that set.  The remaining commits are what comes out in the command's output.  Various other options and paths parameters can be used to further limit the result.
zh_HANS-CN: 你可以把它看成是一个集合操作。从命令行上给出的任何一个提交中可以到达的提交形成一个集合，然后从这个集合中减去任何一个前面带有'{caret}'的提交。  剩下的提交内容就是命令的输出结果。  其他各种选项和路径参数也可以用来进一步限制结果。

note: type: Plain text
en: means "list all the commits which are reachable from 'foo' or 'bar', but not from 'baz'".
zh_HANS-CN: 意思是 "列出所有可以从'foo'或'bar'，但不能从'baz'到达的提交"。

note: type: Plain text
en: A special notation "'<commit1>'..'<commit2>'" can be used as a short-hand for "^'<commit1>' '<commit2>'". For example, either of the following may be used interchangeably:
zh_HANS-CN: 一个特殊的符号"'<commit1>'...'<commit2>'"可以作为"^'<commit1>' '<commit2>'"的简称。例如，以下两种情况可以互换使用。

note: type: Plain text
en: Another special notation is "'<commit1>'...'<commit2>'" which is useful for merges.  The resulting set of commits is the symmetric difference between the two operands.  The following two commands are equivalent:
zh_HANS-CN: 另一个特殊的符号是"'<commit1>'...'<commit2>'"，对合并很有用。  由此产生的提交集合是两个操作数之间的对称差。  以下两个命令是等价的。

note: type: Title ~
en: Commit Limiting
zh_HANS-CN: 承诺限制

note: type: Plain text
en: Besides specifying a range of commits that should be listed using the special notations explained in the description, additional commit limiting may be applied.
zh_HANS-CN: 除了使用描述中解释的特殊符号指定应列出的提交范围，还可以应用额外的提交限制。

note: type: Plain text
en: Using more options generally further limits the output (e.g.  `--since=<date1>` limits to commits newer than `<date1>`, and using it with `--grep=<pattern>` further limits to commits whose log message has a line that matches `<pattern>`), unless otherwise noted.
zh_HANS-CN: 使用更多的选项通常会进一步限制输出（例如，`--since=<date1>`限制在比`<date1>`新的提交，与`--grep=<pattern>`一起使用会进一步限制在日志信息中有一行符合`<pattern>`的提交），除非另有说明。

note: type: Plain text
en: Note that these are applied before commit ordering and formatting options, such as `--reverse`.
zh_HANS-CN: 请注意，这些都是在提交排序和格式化选项之前应用的，如`--反转`。

note: type: Plain text
en: Limit the number of commits to output.
zh_HANS-CN: 限制输出的提交数量。

note: type: Plain text
en: Skip 'number' commits before starting to show the commit output.
zh_HANS-CN: 在开始显示提交输出之前，跳过'数'的提交。

note: type: Labeled list
en: --after=<date>
zh_HANS-CN: --after=<日期>

note: type: Plain text
en: Show commits more recent than a specific date.
zh_HANS-CN: 显示比某一特定日期更近的提交。

note: type: Labeled list
en: --until=<date>
zh_HANS-CN: --until=<日期>

note: type: Plain text
en: Show commits older than a specific date.
zh_HANS-CN: 显示超过特定日期的提交。

note: type: Plain text
en: Limit the commits output to specified time range.
zh_HANS-CN: 将提交的结果限制在指定的时间范围内。

note: type: Plain text
en: Limit the commits output to ones with author/committer header lines that match the specified pattern (regular expression).  With more than one `--author=<pattern>`, commits whose author matches any of the given patterns are chosen (similarly for multiple `--committer=<pattern>`).
zh_HANS-CN: 将提交文件的输出限制在作者/提交人标题行符合指定模式（正则表达式）的文件。  如果有多个`--author=<pattern>`，则会选择作者符合任何一个给定模式的提交（对于多个`--committer=<pattern>`也是如此）。

note: type: Plain text
en: Limit the commits output to ones with reflog entries that match the specified pattern (regular expression). With more than one `--grep-reflog`, commits whose reflog message matches any of the given patterns are chosen.  It is an error to use this option unless `--walk-reflogs` is in use.
zh_HANS-CN: 将提交文件的输出限制在有符合指定模式（正则表达式）的reflog条目的提交文件。如果有多个 `--grep-reflog`，则会选择那些 reflog 信息符合任何指定模式的提交。  除非使用了`--walk-reflogs`，否则使用此选项是错误的。

note: type: Plain text
en: Limit the commits output to ones with log message that matches the specified pattern (regular expression).  With more than one `--grep=<pattern>`, commits whose message matches any of the given patterns are chosen (but see `--all-match`).
zh_HANS-CN: 将提交结果限制在日志信息与指定模式（正则表达式）相匹配的提交。  如果有多个`--grep=<pattern>`，则会选择那些日志信息与任何指定模式相匹配的提交（但见`--all-match`）。

note: type: Plain text
en: When `--notes` is in effect, the message from the notes is matched as if it were part of the log message.
zh_HANS-CN: 当`--笔记`生效时，笔记中的信息被匹配，就像它是日志信息的一部分。

note: type: Plain text
en: Limit the commits output to ones that match all given `--grep`, instead of ones that match at least one.
zh_HANS-CN: 将输出的提交限制在符合所有给定`--grep`的提交，而不是至少符合一个的提交。

note: type: Plain text
en: Limit the commits output to ones with log message that do not match the pattern specified with `--grep=<pattern>`.
zh_HANS-CN: 限定输出的提交信息与`--grep=<pattern>指定的模式不匹配。

note: type: Plain text
en: Match the regular expression limiting patterns without regard to letter case.
zh_HANS-CN: 匹配正则表达式的限制模式，不考虑字母大小写。

note: type: Plain text
en: Consider the limiting patterns to be basic regular expressions; this is the default.
zh_HANS-CN: 将限制性模式视为基本的正则表达式；这是默认的。

note: type: Plain text
en: Consider the limiting patterns to be extended regular expressions instead of the default basic regular expressions.
zh_HANS-CN: 将限制性模式视为扩展的正则表达式，而不是默认的基本正则表达式。

note: type: Plain text
en: Consider the limiting patterns to be fixed strings (don't interpret pattern as a regular expression).
zh_HANS-CN: 将限制性模式视为固定字符串（不要将模式解释为正则表达式）。

note: type: Plain text
en: Consider the limiting patterns to be Perl-compatible regular expressions.
zh_HANS-CN: 将限制性模式视为与Perl兼容的正则表达式。

note: type: Plain text
en: Stop when a given path disappears from the tree.
zh_HANS-CN: 当一个给定的路径从树上消失时停止。

note: type: Plain text
en: Print only merge commits. This is exactly the same as `--min-parents=2`.
zh_HANS-CN: 只打印合并后的提交。这与`--min-parents=2`完全相同。

note: type: Plain text
en: Do not print commits with more than one parent. This is exactly the same as `--max-parents=1`.
zh_HANS-CN: 不打印有一个以上父级的提交。这与`--max-parents=1`完全相同。

note: type: Plain text
en: Show only commits which have at least (or at most) that many parent commits. In particular, `--max-parents=1` is the same as `--no-merges`, `--min-parents=2` is the same as `--merges`.  `--max-parents=0` gives all root commits and `--min-parents=3` all octopus merges.
zh_HANS-CN: 只显示至少（或最多）有那么多父提交的提交。特别是，`--max-parents=1`等同于`--no-merges`，`--min-parents=2`等同于`--merges`。  `--max-parents=0`给出所有根提交，`--min-parents=3`给出所有章鱼合并。

note: type: Plain text
en: Follow only the first parent commit upon seeing a merge commit.  This option can give a better overview when viewing the evolution of a particular topic branch, because merges into a topic branch tend to be only about adjusting to updated upstream from time to time, and this option allows you to ignore the individual commits brought in to your history by such a merge.
zh_HANS-CN: 在看到一个合并提交时，只关注第一个父提交。  在查看某个主题分支的演变时，这个选项可以提供一个更好的概览，因为合并到一个主题分支往往只是为了适应不时更新的上游，而这个选项可以让你忽略这种合并给你的历史带来的个别提交。

note: type: Plain text
en: This option also changes default diff format for merge commits to `first-parent`, see `--diff-merges=first-parent` for details.
zh_HANS-CN: 这个选项也改变了合并提交的默认差异格式为 "first-parent"，详见"-diff-merges=first-parent"。

note: type: Plain text
en: Reverses the meaning of the '{caret}' prefix (or lack thereof)  for all following revision specifiers, up to the next `--not`.
zh_HANS-CN: 颠倒"{caret}"前缀（或没有前缀）对所有后续修订指定符的意义，直到下一个`--not`。

note: type: Plain text
en: Pretend as if all the refs in `refs/`, along with `HEAD`, are listed on the command line as '<commit>'.
zh_HANS-CN: 假设`refs/`中的所有参考文献，连同`HEAD`一起，在命令行中被列为'<commit>'。

note: type: Labeled list
en: --branches[=<pattern>]
zh_HANS-CN: --支部[=<模式>]

note: type: Plain text
en: Pretend as if all the refs in `refs/heads` are listed on the command line as '<commit>'. If '<pattern>' is given, limit branches to ones matching given shell glob. If pattern lacks '?', '{asterisk}', or '[', '/{asterisk}' at the end is implied.
zh_HANS-CN: 假设`refs/heads`中的所有 refs 在命令行中被列为 '<commit>'。如果给出了'<pattern>'，将分支限制在与给定的shell glob相匹配的分支。如果pattern缺少'?'、'{asterisk}'或'['，则末尾的'/{asterisk}'是暗示的。

note: type: Plain text
en: Pretend as if all the refs in `refs/tags` are listed on the command line as '<commit>'. If '<pattern>' is given, limit tags to ones matching given shell glob. If pattern lacks '?', '{asterisk}', or '[', '/{asterisk}' at the end is implied.
zh_HANS-CN: 假设`refs/tags`中的所有参考文献在命令行中被列为'<commit>'。如果给出了'<pattern>'，将标签限制在与给定的shell glob相匹配的标签。如果pattern缺少'?'、'{asterisk}'或'['，则暗示最后的'/{asterisk}'。

note: type: Plain text
en: Pretend as if all the refs in `refs/remotes` are listed on the command line as '<commit>'. If '<pattern>' is given, limit remote-tracking branches to ones matching given shell glob.  If pattern lacks '?', '{asterisk}', or '[', '/{asterisk}' at the end is implied.
zh_HANS-CN: 假设`refs/remotes`中的所有 refs 在命令行中被列为 '<commit>'。如果给出了'<pattern>'，将远程跟踪分支限制在与给定的shell glob相匹配的分支。  如果pattern缺少'?'、'{asterisk}'或'['，则末尾的'/{asterisk}'是暗示的。

note: type: Plain text
en: Pretend as if all the refs matching shell glob '<glob-pattern>' are listed on the command line as '<commit>'. Leading 'refs/', is automatically prepended if missing. If pattern lacks '?', '{asterisk}', or '[', '/{asterisk}' at the end is implied.
zh_HANS-CN: 假设所有与shell glob '<glob-pattern>相匹配的refs在命令行中被列为'<commit>'。前面的'refs/'，如果缺少的话会自动预加。如果模式中缺少'?'、'{asterisk}'或'['，则在结尾处隐含'/{asterisk}'。

note: type: Plain text
en: Pretend as if all objects mentioned by reflogs are listed on the command line as `<commit>`.
zh_HANS-CN: 假设reflogs提到的所有对象都在命令行中被列为`<commit>`。

note: type: Plain text
en: Pretend as if all objects mentioned as ref tips of alternate repositories were listed on the command line. An alternate repository is any repository whose object directory is specified in `objects/info/alternates`.  The set of included objects may be modified by `core.alternateRefsCommand`, etc. See linkgit:git-config[1].
zh_HANS-CN: 假设所有提到的作为备用仓库的参考提示的对象都列在命令行上。备用资源库是任何资源库，其对象目录在`objects/info/alternates`中指定。  包含的对象集可以通过`core.alternateRefsCommand`等修改。见linkgit:git-config[1]。

note: type: Plain text
en: By default, all working trees will be examined by the following options when there are more than one (see linkgit:git-worktree[1]): `--all`, `--reflog` and `--indexed-objects`.  This option forces them to examine the current working tree only.
zh_HANS-CN: 默认情况下，当有多个工作树时，所有工作树都会被以下选项检查（见linkgit:git-worktree[1]）：`--all`，`--reflog`和`--indexed-objects`。  这个选项强制它们只检查当前的工作树。

note: type: Plain text
en: Upon seeing an invalid object name in the input, pretend as if the bad input was not given.
zh_HANS-CN: 在看到输入中无效的对象名称时，假装没有给出坏的输入。

note: type: Plain text
en: Pretend as if the bad bisection ref `refs/bisect/bad` was listed and as if it was followed by `--not` and the good bisection refs `refs/bisect/good-*` on the command line.
zh_HANS-CN: 假设坏的二分法参考文献`refs/bisect/bad`被列出，并且在命令行中假设它后面是`--not`和好的二分法参考文献`refs/bisect/good-*`。

note: type: Plain text
en: In addition to the '<commit>' listed on the command line, read them from the standard input. If a `--` separator is seen, stop reading commits and start reading paths to limit the result.
zh_HANS-CN: 除了命令行上列出的'<commit>'之外，还要从标准输入中读取它们。如果看到`--`分隔符，就停止读取提交，开始读取路径以限制结果。

note: type: Plain text
en: Don't print anything to standard output.  This form is primarily meant to allow the caller to test the exit status to see if a range of objects is fully connected (or not).  It is faster than redirecting stdout to `/dev/null` as the output does not have to be formatted.
zh_HANS-CN: 不要打印任何东西到标准输出。  这种形式主要是为了让调用者测试退出状态，看看一系列的对象是否完全连接（或没有）。  它比将stdout重定向到`/dev/null`要快，因为输出不需要被格式化。

note: type: Plain text
en: Suppress normal output; instead, print the sum of the bytes used for on-disk storage by the selected commits or objects. This is equivalent to piping the output into `git cat-file --batch-check='%(objectsize:disk)'`, except that it runs much faster (especially with `--use-bitmap-index`). See the `CAVEATS` section in linkgit:git-cat-file[1] for the limitations of what "on-disk storage" means.
zh_HANS-CN: 抑制正常输出；相反，打印所选提交或对象用于磁盘存储的字节数之和。这相当于用管道将输出写入 `git cat-file --batch-check='%(objectsize:disk)'，只是它的运行速度要快得多（尤其是在使用 `--use-bitmap-index'时）。参见 linkgit:git-cat-file[1] 中的 `CAVEATS` 部分，了解 "磁盘存储 "的限制。

note: type: Plain text
en: Like `--cherry-pick` (see below) but mark equivalent commits with `=` rather than omitting them, and inequivalent ones with `+`.
zh_HANS-CN: 就像`--cherry-pick`（见下文），但用`=`标记同等的提交，而不是省略，用`+`标记不同等的提交。

note: type: Plain text
en: Omit any commit that introduces the same change as another commit on the ``other side'' when the set of commits are limited with symmetric difference.
zh_HANS-CN: 当提交的集合有对称差异时，省略任何与 "另一边 "的另一个提交相同的提交。

note: type: Plain text
en: For example, if you have two branches, `A` and `B`, a usual way to list all commits on only one side of them is with `--left-right` (see the example below in the description of the `--left-right` option). However, it shows the commits that were cherry-picked from the other branch (for example, ``3rd on b'' may be cherry-picked from branch A). With this option, such pairs of commits are excluded from the output.
zh_HANS-CN: 例如，如果你有两个分支，`A`和`B`，通常的方法是用`--左--右`列出其中一边的所有提交（见下面关于`--左--右`选项的描述）。然而，它显示的是从另一个分支中偷梁换柱的提交（例如，"3rd on b "可能是从分支A中偷梁换柱的）。有了这个选项，这样的提交对将从输出中排除。

note: type: Plain text
en: List only commits on the respective side of a symmetric difference, i.e. only those which would be marked `<` resp. `>` by `--left-right`.
zh_HANS-CN: 只列出对称性差异各自一侧的提交，即只列出那些通过"--左--右 "标记的"<"或">"。

note: type: Plain text
en: For example, `--cherry-pick --right-only A...B` omits those commits from `B` which are in `A` or are patch-equivalent to a commit in `A`. In other words, this lists the `+` commits from `git cherry A B`.  More precisely, `--cherry-pick --right-only --no-merges` gives the exact list.
zh_HANS-CN: 例如，`--cherry-pick --right-only A...B`省略了`B`中那些在`A`中的提交或与`A`中的提交相等的补丁。换句话说，它列出了 "git cherry A B "的 "+"的提交。  更准确地说，`--cherry-pick --right-only --no-merges`可以得到准确的列表。

note: type: Plain text
en: A synonym for `--right-only --cherry-mark --no-merges`; useful to limit the output to the commits on our side and mark those that have been applied to the other side of a forked history with `git log --cherry upstream...mybranch`, similar to `git cherry upstream mybranch`.
zh_HANS-CN: `--right-only --cherry-mark --no-merges`的同义词；有助于将输出限制在我们这边的提交，并标记那些已经应用到分叉历史的另一边的提交，`git log --cherry upstream...mybranch`，类似于`git cherry upstream mybranch`。

note: type: Plain text
en: Instead of walking the commit ancestry chain, walk reflog entries from the most recent one to older ones.  When this option is used you cannot specify commits to exclude (that is, '{caret}commit', 'commit1..commit2', and 'commit1\...commit2' notations cannot be used).
zh_HANS-CN: 不走提交祖先链，而走从最近的提交到更早的提交的reflog条目。  使用这个选项时，你不能指定要排除的提交（也就是说，不能使用'{caret}commit'、'commit1...commit2'和'commit1/...commit2'的符号）。

note: type: Plain text
en: With `--pretty` format other than `oneline` and `reference` (for obvious reasons), this causes the output to have two extra lines of information taken from the reflog.  The reflog designator in the output may be shown as `ref@{Nth}` (where `Nth` is the reverse-chronological index in the reflog) or as `ref@{timestamp}` (with the timestamp for that entry), depending on a few rules:
zh_HANS-CN: 在`--pretty`格式下，除了`oneline`和`reference`（由于明显的原因），这将导致输出有两行额外的信息来自reflog。  输出中的reflog代号可以显示为`ref@{Nth}`（其中`Nth`是reflog中的逆序索引）或`ref@{timestamp}`（带有该条目的时间戳），取决于一些规则。

note: type: Plain text
en: If the starting point is specified as `ref@{Nth}`, show the index format.
zh_HANS-CN: 如果起点被指定为`ref@{Nth}`，显示索引格式。

note: type: Plain text
en: If the starting point was specified as `ref@{now}`, show the timestamp format.
zh_HANS-CN: 如果起点被指定为`ref@{now}`，显示时间戳格式。

note: type: Plain text
en: If neither was used, but `--date` was given on the command line, show the timestamp in the format requested by `--date`.
zh_HANS-CN: 如果两者都没有使用，但在命令行中给出了`--date`，则按照`--date`所要求的格式显示时间戳。

note: type: Plain text
en: Otherwise, show the index format.
zh_HANS-CN: 否则，显示索引格式。

note: type: Plain text
en: Under `--pretty=oneline`, the commit message is prefixed with this information on the same line.  This option cannot be combined with `--reverse`.  See also linkgit:git-reflog[1].
zh_HANS-CN: 在`--pretty=oneline`下，提交信息的前缀是同一行中的这些信息。  这个选项不能与 `--reverse`结合使用。  参见 linkgit:git-reflog[1]。

note: type: Plain text
en: Under `--pretty=reference`, this information will not be shown at all.
zh_HANS-CN: 在`--pretty=reference`下，这些信息将完全不显示。

note: type: Plain text
en: After a failed merge, show refs that touch files having a conflict and don't exist on all heads to merge.
zh_HANS-CN: 在合并失败后，显示触及有冲突的文件且不存在于所有要合并的头的参考文件。

note: type: Plain text
en: Output excluded boundary commits. Boundary commits are prefixed with `-`.
zh_HANS-CN: 输出排除的边界提交。边界提交的前缀是"-"。

note: type: Plain text
en: Try to speed up the traversal using the pack bitmap index (if one is available). Note that when traversing with `--objects`, trees and blobs will not have their associated path printed.
zh_HANS-CN: 尝试使用包位图索引（如果有的话）来加快遍历的速度。注意，当使用`--对象`进行遍历时，树和blobs不会打印出它们的相关路径。

note: type: Labeled list
en: --progress=<header>
zh_HANS-CN: --progress=<header>。

note: type: Plain text
en: Show progress reports on stderr as objects are considered. The `<header>` text will be printed with each progress update.
zh_HANS-CN: 在考虑对象时在stderr上显示进度报告。`<标题>`文本将在每次进度更新时打印。

note: type: Title ~
en: History Simplification
zh_HANS-CN: 简化历史

note: type: Plain text
en: Sometimes you are only interested in parts of the history, for example the commits modifying a particular <path>. But there are two parts of 'History Simplification', one part is selecting the commits and the other is how to do it, as there are various strategies to simplify the history.
zh_HANS-CN: 有时你只对历史的一部分感兴趣，例如修改某个<路径>的提交。但 "历史简化 "有两部分，一部分是选择提交，另一部分是如何做，因为有各种策略来简化历史。

note: type: Plain text
en: The following options select the commits to be shown:
zh_HANS-CN: 以下选项选择要显示的提交。

note: type: Plain text
en: Commits modifying the given <paths> are selected.
zh_HANS-CN: 修改给定<路径>的提交会被选中。

note: type: Plain text
en: Commits that are referred by some branch or tag are selected.
zh_HANS-CN: 被某个分支或标签引用的提交被选中。

note: type: Plain text
en: Note that extra commits can be shown to give a meaningful history.
zh_HANS-CN: 请注意，可以显示额外的提交，以提供一个有意义的历史。

note: type: Plain text
en: The following options affect the way the simplification is performed:
zh_HANS-CN: 以下选项会影响简化的执行方式。

note: type: Plain text
en: Simplifies the history to the simplest history explaining the final state of the tree. Simplest because it prunes some side branches if the end result is the same (i.e. merging branches with the same content)
zh_HANS-CN: 将历史简化为解释树的最终状态的最简单的历史。最简单的原因是，如果最终结果相同，它会修剪一些侧枝（即合并具有相同内容的分支）。

note: type: Plain text
en: Include all commits from the default mode, but also any merge commits that are not TREESAME to the first parent but are TREESAME to a later parent. This mode is helpful for showing the merge commits that "first introduced" a change to a branch.
zh_HANS-CN: 包括默认模式下的所有提交，但也包括任何与第一个父分支不相干但与后来的父分支相干的合并提交。这种模式有助于显示 "首次引入 "某个分支的合并提交。

note: type: Plain text
en: Same as the default mode, but does not prune some history.
zh_HANS-CN: 与默认模式相同，但不修剪一些历史记录。

note: type: Plain text
en: Only the selected commits are shown, plus some to have a meaningful history.
zh_HANS-CN: 只显示所选的提交，再加上一些才有意义的历史。

note: type: Plain text
en: All commits in the simplified history are shown.
zh_HANS-CN: 简化历史中的所有提交都会显示出来。

note: type: Plain text
en: Additional option to `--full-history` to remove some needless merges from the resulting history, as there are no selected commits contributing to this merge.
zh_HANS-CN: 为`--full-history`增加了一个选项，可以从结果的历史中删除一些不必要的合并，因为没有选定的提交对这次合并有贡献。

note: type: Plain text
en: When given a range of commits to display (e.g. 'commit1..commit2' or 'commit2 {caret}commit1'), only display commits that exist directly on the ancestry chain between the 'commit1' and 'commit2', i.e. commits that are both descendants of 'commit1', and ancestors of 'commit2'.
zh_HANS-CN: 当给定一个要显示的提交范围（例如 "commit1...commit2 "或 "commit2 {caret}commit1"）时，只显示直接存在于 "commit1 "和 "commit2 "之间的祖先链的提交，即既是 "commit1 "的后代，又是 "commit2 "的祖先的提交。

note: type: Plain text
en: A more detailed explanation follows.
zh_HANS-CN: 以下是更详细的解释。

note: type: Plain text
en: Suppose you specified `foo` as the <paths>.  We shall call commits that modify `foo` !TREESAME, and the rest TREESAME.  (In a diff filtered for `foo`, they look different and equal, respectively.)
zh_HANS-CN: 假设你指定了`foo`作为<paths>。  我们将把修改`foo`的提交称为 !TREESAME，其余的称为 TREESAME。  (在为`foo`过滤的diff中，它们看起来分别是不同的和相同的)。

note: type: Plain text
en: In the following, we will always refer to the same example history to illustrate the differences between simplification settings.  We assume that you are filtering for a file `foo` in this commit graph:
zh_HANS-CN: 在下文中，我们将始终引用同一个历史实例来说明简化设置之间的差异。  我们假设你在这个提交图中过滤的是一个文件`foo`。

note: type: Plain text
en: The horizontal line of history A---Q is taken to be the first parent of each merge.  The commits are:
zh_HANS-CN: 历史A---Q的横线被认为是每次合并的第一个父本。  这些提交是

note: type: Plain text
en: `I` is the initial commit, in which `foo` exists with contents ``asdf'', and a file `quux` exists with contents ``quux''. Initial commits are compared to an empty tree, so `I` is !TREESAME.
zh_HANS-CN: `I`是初始提交，其中`foo`存在，内容是`asdf''，文件`quux`存在，内容是`quux''。初始提交与空树比较，所以`I`是！`TREESAME。

note: type: Plain text
en: In `A`, `foo` contains just ``foo''.
zh_HANS-CN: 在`A`中，`foo`只包含`foo''。

note: type: Plain text
en: `B` contains the same change as `A`.  Its merge `M` is trivial and hence TREESAME to all parents.
zh_HANS-CN: `B`包含与`A`相同的变化。  它的合并`M`是微不足道的，因此对所有父类来说是TREESAME。

note: type: Plain text
en: `C` does not change `foo`, but its merge `N` changes it to ``foobar'', so it is not TREESAME to any parent.
zh_HANS-CN: `C`没有改变`foo`，但是它的合并`N`将其改为`foobar''，所以它与任何父类都不存在TREESAME。

note: type: Plain text
en: `D` sets `foo` to ``baz''. Its merge `O` combines the strings from `N` and `D` to ``foobarbaz''; i.e., it is not TREESAME to any parent.
zh_HANS-CN: `D`将`foo`设置为`baz''。它的合并项`O`将`N`和`D`的字符串合并为`foobarbaz''；也就是说，它与任何父类都不是TREESAME。

note: type: Plain text
en: `E` changes `quux` to ``xyzzy'', and its merge `P` combines the strings to ``quux xyzzy''. `P` is TREESAME to `O`, but not to `E`.
zh_HANS-CN: `E`将`quux`改为`xyzzy''，其合并的`P`将这些字符串合并为`quux xyzzy''。`P'与`O'的关系是TREESAME，但与`E'不是。

note: type: Plain text
en: `X` is an independent root commit that added a new file `side`, and `Y` modified it. `Y` is TREESAME to `X`. Its merge `Q` added `side` to `P`, and `Q` is TREESAME to `P`, but not to `Y`.
zh_HANS-CN: `X`是一个独立的根提交，添加了一个新文件`side`，`Y`修改了它。`Y`与`X`同为TREESAME。它的合并文件`Q`在`P`上添加了`side`，`Q`与`P`是同源，但与`Y`不是同源。

note: type: Plain text
en: `rev-list` walks backwards through history, including or excluding commits based on whether `--full-history` and/or parent rewriting (via `--parents` or `--children`) are used. The following settings are available.
zh_HANS-CN: `rev-list`在历史中倒退，根据是否使用`--full-history`和/或父代重写（通过`--parents`或`--children`），包括或排除提交。以下设置是可用的。

note: type: Plain text
en: Commits are included if they are not TREESAME to any parent (though this can be changed, see `--sparse` below).  If the commit was a merge, and it was TREESAME to one parent, follow only that parent.  (Even if there are several TREESAME parents, follow only one of them.)  Otherwise, follow all parents.
zh_HANS-CN: 如果提交的内容与任何父类不相干，则被包括在内（当然这一点可以改变，见下面的`--sparse`）。  如果该提交是一个合并，并且它与一个父类是同源的，则只跟随该父类。  (即使有几个TREESAME父类，也只跟随其中一个。) 否则，跟随所有父类。

note: type: Plain text
en: Note how the rule to only follow the TREESAME parent, if one is available, removed `B` from consideration entirely.  `C` was considered via `N`, but is TREESAME.  Root commits are compared to an empty tree, so `I` is !TREESAME.
zh_HANS-CN: 请注意，如果有TREESAME父类的话，只遵循TREESAME父类的规则，将`B'完全排除在考虑之外。  `C`是通过`N`考虑的，但也是TREESAME。  根提交是与空树比较的，所以`I`是!!TREESAME。

note: type: Plain text
en: Parent/child relations are only visible with `--parents`, but that does not affect the commits selected in default mode, so we have shown the parent lines.
zh_HANS-CN: 父/子关系只有在`--父母`的情况下才能看到，但这并不影响在默认模式下选择的提交，所以我们显示了父行。

note: type: Plain text
en: This mode differs from the default in one point: always follow all parents of a merge, even if it is TREESAME to one of them.  Even if more than one side of the merge has commits that are included, this does not imply that the merge itself is! In the example, we get
zh_HANS-CN: 这种模式与默认模式有一点不同：总是跟随一个合并的所有父本，即使它与其中一个父本是TREESAME。  即使合并的一方有多个提交被包括在内，这也不意味着合并本身也是如此在这个例子中，我们得到

note: type: Plain text
en: `M` was excluded because it is TREESAME to both parents.  `E`, `C` and `B` were all walked, but only `B` was !TREESAME, so the others do not appear.
zh_HANS-CN: `M'被排除在外，因为它与父母都是TREESAME。  `E'、`C'和`B'都走了，但只有`B'是！"TREESAME"，所以其他的都没有出现。

note: type: Plain text
en: Note that without parent rewriting, it is not really possible to talk about the parent/child relationships between the commits, so we show them disconnected.
zh_HANS-CN: 请注意，如果没有父子重写，其实是不可能谈论提交之间的父子关系的，所以我们显示它们是不相连的。

note: type: Plain text
en: Ordinary commits are only included if they are !TREESAME (though this can be changed, see `--sparse` below).
zh_HANS-CN: 普通的提交只有当它们是！TREESAME时才会被包括在内（尽管这一点可以改变，见下面的`--sparse`）。

note: type: Plain text
en: Merges are always included.  However, their parent list is rewritten: Along each parent, prune away commits that are not included themselves.  This results in
zh_HANS-CN: 合并总是被包括在内。  然而，他们的父级列表会被重写。沿着每个父级，修剪掉那些不包括自己的提交。  这样做的结果是

note: type: Plain text
en: Compare to `--full-history` without rewriting above.  Note that `E` was pruned away because it is TREESAME, but the parent list of P was rewritten to contain `E`'s parent `I`.  The same happened for `C` and `N`, and `X`, `Y` and `Q`.
zh_HANS-CN: 与上面的`--full-history`相比，没有重写。  请注意，`E`被修剪掉了，因为它是TREESAME，但是P的父列表被改写为包含`E`的父`I`。  同样的情况发生在`C`和`N`，以及`X`、`Y`和`Q`。

note: type: Plain text
en: In addition to the above settings, you can change whether TREESAME affects inclusion:
zh_HANS-CN: 除了上述设置外，你还可以改变TRESAME是否会影响收录。

note: type: Plain text
en: Commits that are walked are included if they are not TREESAME to any parent.
zh_HANS-CN: 如果不与任何父类有TREESAME关系，则包括走过的承诺。

note: type: Plain text
en: All commits that are walked are included.
zh_HANS-CN: 所有走过的提交都包括在内。

note: type: Plain text
en: Note that without `--full-history`, this still simplifies merges: if one of the parents is TREESAME, we follow only that one, so the other sides of the merge are never walked.
zh_HANS-CN: 请注意，如果没有`--full-history`，这仍然可以简化合并：如果父代之一是TREESAME，我们只跟随这个父代，所以合并的其他方面永远不会被走。

note: type: Plain text
en: First, build a history graph in the same way that `--full-history` with parent rewriting does (see above).
zh_HANS-CN: 首先，按照`--full-history`与父级改写的相同方式建立一个历史图（见上文）。

note: type: Plain text
en: Then simplify each commit `C` to its replacement `C'` in the final history according to the following rules:
zh_HANS-CN: 然后根据以下规则将每个提交的`C'简化为最终历史中的替换`C'。

note: type: Plain text
en: Set `C'` to `C`.
zh_HANS-CN: 将 "C "设为 "C"。

note: type: Plain text
en: Replace each parent `P` of `C'` with its simplification `P'`.  In the process, drop parents that are ancestors of other parents or that are root commits TREESAME to an empty tree, and remove duplicates, but take care to never drop all parents that we are TREESAME to.
zh_HANS-CN: 将`C'`的每个父类`P'替换成其简化的`P'`。  在这个过程中，放弃那些是其他父类的祖先的父类，或者是根部提交TREESAME的空树，并删除重复的父类，但注意不要放弃所有我们是TREESAME的父类。

note: type: Plain text
en: If after this parent rewriting, `C'` is a root or merge commit (has zero or >1 parents), a boundary commit, or !TREESAME, it remains.  Otherwise, it is replaced with its only parent.
zh_HANS-CN: 如果在这次父级改写之后，`C'`是一个根或合并提交（有0个或>1个父级），一个边界提交，或！TREESAME，那么它将被保留。  否则，它将被替换为其唯一的父类。

note: type: Plain text
en: The effect of this is best shown by way of comparing to `--full-history` with parent rewriting.  The example turns into:
zh_HANS-CN: 通过与`--full-history`的父级改写进行比较，可以最好地显示其效果。  这个例子变成了。

note: type: Plain text
en: Note the major differences in `N`, `P`, and `Q` over `--full-history`:
zh_HANS-CN: 注意`N'、`P'和`Q'与`--full-history'的主要区别。

note: type: Plain text
en: `N`'s parent list had `I` removed, because it is an ancestor of the other parent `M`.  Still, `N` remained because it is !TREESAME.
zh_HANS-CN: `N`的父列表中删除了`I`，因为它是另一个父`M`的一个祖先。  但是，`N`仍然存在，因为它是!TREESAME。

note: type: Plain text
en: `P`'s parent list similarly had `I` removed.  `P` was then removed completely, because it had one parent and is TREESAME.
zh_HANS-CN: `P`的父级列表也同样删除了`I`。  然后`P`被完全删除，因为它有一个父本，并且是TREESAME。

note: type: Plain text
en: `Q`'s parent list had `Y` simplified to `X`. `X` was then removed, because it was a TREESAME root. `Q` was then removed completely, because it had one parent and is TREESAME.
zh_HANS-CN: `Q`的父列表中有`Y`简化为`X`。然后`X`被删除，因为它是一个TREESAME根。然后`Q`被完全删除，因为它有一个父级，是TREESAME。

note: type: Plain text
en: There is another simplification mode available:
zh_HANS-CN: 还有一种简化模式可用。

note: type: Plain text
en: Limit the displayed commits to those directly on the ancestry chain between the ``from'' and ``to'' commits in the given commit range. I.e. only display commits that are ancestor of the ``to'' commit and descendants of the ``from'' commit.
zh_HANS-CN: 将显示的提交限制在给定提交范围内 "from "和 "to "提交之间的直接祖先链上。也就是说，只显示 "to "提交的祖先和 "from "提交的后代的提交。

note: type: Plain text
en: As an example use case, consider the following commit history:
zh_HANS-CN: 作为一个用例，请考虑以下提交历史。

note: type: delimited block -
en: 	    D---E-------F
    	   /     \       \
    	  B---C---G---H---I---J
    	 /                     \
    	A-------K---------------L--M
zh_HANS-CN: 	    D--E-------F
    	   / \ \
    	  B---C---G---H---I---J
    	 / \
    	A-------K---------------L--M

note: type: Plain text
en: A regular 'D..M' computes the set of commits that are ancestors of `M`, but excludes the ones that are ancestors of `D`. This is useful to see what happened to the history leading to `M` since `D`, in the sense that ``what does `M` have that did not exist in `D`''. The result in this example would be all the commits, except `A` and `B` (and `D` itself, of course).
zh_HANS-CN: 有规律的 "D...M "会计算出作为`M`的祖先的提交集合，但不包括作为`D`的祖先的提交。这对了解`M'的历史在`D'之后发生了什么很有用，也就是说`M'有什么东西是`D'没有的'。这个例子中的结果是所有的提交，除了`A`和`B`（当然还有`D`本身）。

note: type: Plain text
en: When we want to find out what commits in `M` are contaminated with the bug introduced by `D` and need fixing, however, we might want to view only the subset of 'D..M' that are actually descendants of `D`, i.e.  excluding `C` and `K`. This is exactly what the `--ancestry-path` option does. Applied to the 'D..M' range, it results in:
zh_HANS-CN: 然而，当我们想找出`M'中哪些提交被`D'引入的错误所污染而需要修复时，我们可能只想查看'D...M'中实际上是`D'的后代的子集，即排除`C'和`K'。这正是`--ancestry-path`选项的作用。应用于'D...M'范围，它的结果是：

note: type: delimited block -
en: 		E-------F
    		 \       \
    		  G---H---I---J
    			       \
    				L--M
zh_HANS-CN: 		E-------F
    		 \ \
    		  G--H--I--J
    			       \
    				L--M

note: type: Plain text
en: Before discussing another option, `--show-pulls`, we need to create a new example history.
zh_HANS-CN: 在讨论另一个选项，`--显示--推力'之前，我们需要创建一个新的历史实例。

note: type: Plain text
en: A common problem users face when looking at simplified history is that a commit they know changed a file somehow does not appear in the file's simplified history. Let's demonstrate a new example and show how options such as `--full-history` and `--simplify-merges` works in that case:
zh_HANS-CN: 用户在查看简化历史时经常遇到的一个问题是，他们知道的对某个文件的修改提交并没有出现在该文件的简化历史中。让我们演示一个新的例子，并说明`--full-history`和`--simplify-merges`等选项在这种情况下是如何工作的。

note: type: Plain text
en: For this example, suppose `I` created `file.txt` which was modified by `A`, `B`, and `X` in different ways. The single-parent commits `C`, `Z`, and `Y` do not change `file.txt`. The merge commit `M` was created by resolving the merge conflict to include both changes from `A` and `B` and hence is not TREESAME to either. The merge commit `R`, however, was created by ignoring the contents of `file.txt` at `M` and taking only the contents of `file.txt` at `X`. Hence, `R` is TREESAME to `X` but not `M`. Finally, the natural merge resolution to create `N` is to take the contents of `file.txt` at `R`, so `N` is TREESAME to `R` but not `C`.  The merge commits `O` and `P` are TREESAME to their first parents, but not to their second parents, `Z` and `Y` respectively.
zh_HANS-CN: 在这个例子中，假设`I`创建了`file.txt`，并被`A`、`B`和`X`以不同方式修改。单亲提交的`C`、`Z`和`Y`没有修改`file.txt`。合并提交 "M "是通过解决合并冲突而产生的，包括了 "A "和 "B "的修改，因此与其中任何一个都不是同源的。然而，合并提交`R`是通过忽略`M`处的`file.txt`的内容，而只采用`X`处的`file.txt`的内容而产生的。因此，`R`与`X`是同源的，但不是`M`。最后，创建`N'的自然合并决议是取`file.txt`在`R'的内容，所以`N'与`R'是同源的，但不是`C'。  合并提交的 "O "和 "P "与它们的第一代父母是同源的，但与它们的第二代父母 "Z "和 "Y "则不是同源的。

note: type: Plain text
en: When using the default mode, `N` and `R` both have a TREESAME parent, so those edges are walked and the others are ignored. The resulting history graph is:
zh_HANS-CN: 当使用默认模式时，`N'和`R'都有一个TREESAME父级，所以这些边被走，其他的被忽略。由此产生的历史图是。

note: type: delimited block -
en: 	I---X
zh_HANS-CN: 	I--X

note: type: Plain text
en: When using `--full-history`, Git walks every edge. This will discover the commits `A` and `B` and the merge `M`, but also will reveal the merge commits `O` and `P`. With parent rewriting, the resulting graph is:
zh_HANS-CN: 当使用`--full-history`时，Git会行走每条边。这将发现提交`A`和`B`以及合并`M`，但也将揭示合并提交`O`和`P`。通过父级改写，得到的图是。

note: type: Plain text
en: Here, the merge commits `O` and `P` contribute extra noise, as they did not actually contribute a change to `file.txt`. They only merged a topic that was based on an older version of `file.txt`. This is a common issue in repositories using a workflow where many contributors work in parallel and merge their topic branches along a single trunk: manu unrelated merges appear in the `--full-history` results.
zh_HANS-CN: 这里，合并提交`O`和`P`带来了额外的噪音，因为它们实际上并没有对`file.txt`做出改变。他们只是合并了一个基于 "file.txt "旧版本的主题。这是在使用工作流程的仓库中常见的问题，在工作流程中，许多贡献者并行工作，并沿着一个主干合并他们的主题分支：不相关的合并出现在`--full-history`结果中。

note: type: Plain text
en: When using the `--simplify-merges` option, the commits `O` and `P` disappear from the results. This is because the rewritten second parents of `O` and `P` are reachable from their first parents. Those edges are removed and then the commits look like single-parent commits that are TREESAME to their parent. This also happens to the commit `N`, resulting in a history view as follows:
zh_HANS-CN: 当使用`--简化合并`选项时，提交的`O`和`P`从结果中消失。这是因为 "O "和 "P "重写的第二父本可以从它们的第一父本到达。这些边被移除，然后这些提交看起来就像与它们的父类一样的单亲提交。这也发生在提交`N`上，导致历史视图如下。

note: type: Plain text
en: In this view, we see all of the important single-parent changes from `A`, `B`, and `X`. We also see the carefully-resolved merge `M` and the not-so-carefully-resolved merge `R`. This is usually enough information to determine why the commits `A` and `B` "disappeared" from history in the default view. However, there are a few issues with this approach.
zh_HANS-CN: 在这个视图中，我们看到了所有来自`A`，`B`和`X`的重要单亲变化。我们还可以看到仔细解决的合并`M`和不那么仔细解决的合并`R`。这些信息通常足以确定为什么`A`和`B`的提交在默认视图中从历史中 "消失 "了。然而，这种方法也有一些问题。

note: type: Plain text
en: The first issue is performance. Unlike any previous option, the `--simplify-merges` option requires walking the entire commit history before returning a single result. This can make the option difficult to use for very large repositories.
zh_HANS-CN: 第一个问题是性能。与之前的任何选项不同，`--简化合并'选项需要在返回一个结果之前走完整个提交历史。这可能使该选项难以用于非常大的仓库。

note: type: Plain text
en: The second issue is one of auditing. When many contributors are working on the same repository, it is important which merge commits introduced a change into an important branch. The problematic merge `R` above is not likely to be the merge commit that was used to merge into an important branch. Instead, the merge `N` was used to merge `R` and `X` into the important branch. This commit may have information about why the change `X` came to override the changes from `A` and `B` in its commit message.
zh_HANS-CN: 第二个问题是审计的问题。当许多贡献者在同一个版本库中工作时，哪些合并提交将一个变化引入到一个重要的分支是很重要的。上面有问题的合并`R`不可能是用来合并到一个重要分支的合并提交。相反，`N'是用来将`R'和`X'合并到重要分支的。这个提交可能有关于为什么`X'会覆盖`A'和`B'的修改的信息，在其提交信息中。

note: type: Plain text
en: In addition to the commits shown in the default history, show each merge commit that is not TREESAME to its first parent but is TREESAME to a later parent.
zh_HANS-CN: 除了在默认历史中显示的提交之外，还要显示每一个与第一个父本不相同但与后来的父本相同的合并提交。

note: type: Plain text
en: When a merge commit is included by `--show-pulls`, the merge is treated as if it "pulled" the change from another branch. When using `--show-pulls` on this example (and no other options) the resulting graph is:
zh_HANS-CN: 当一个合并提交被`--show-pulls`包含时，该合并被视为从另一个分支 "拉 "来的修改。在这个例子中使用`--show-pulls`时（没有其他选项），得到的图表是。

note: type: delimited block -
en: 	I---X---R---N
zh_HANS-CN: 	I--X--R--N

note: type: Plain text
en: Here, the merge commits `R` and `N` are included because they pulled the commits `X` and `R` into the base branch, respectively. These merges are the reason the commits `A` and `B` do not appear in the default history.
zh_HANS-CN: 这里，合并后的提交`R`和`N`被包括在内，因为它们分别将提交`X`和`R`拉到了基础分支。这些合并是`A`和`B`的提交没有出现在默认历史中的原因。

note: type: Plain text
en: When `--show-pulls` is paired with `--simplify-merges`, the graph includes all of the necessary information:
zh_HANS-CN: 当`--show-pulls`与`--simplify-merges`配对时，该图包括所有必要的信息。

note: type: Plain text
en: Notice that since `M` is reachable from `R`, the edge from `N` to `M` was simplified away. However, `N` still appears in the history as an important commit because it "pulled" the change `R` into the main branch.
zh_HANS-CN: 请注意，由于`M`可以从`R`到达，从`N`到`M`的边被简化掉了。然而，`N`仍然作为一个重要的提交出现在历史中，因为它把`R`的修改 "拉 "进了主分支。

note: type: Plain text
en: The `--simplify-by-decoration` option allows you to view only the big picture of the topology of the history, by omitting commits that are not referenced by tags.  Commits are marked as !TREESAME (in other words, kept after history simplification rules described above) if (1) they are referenced by tags, or (2) they change the contents of the paths given on the command line.  All other commits are marked as TREESAME (subject to be simplified away).
zh_HANS-CN: `--按装饰简化'选项允许你只查看历史拓扑的全貌，省略那些没有被标签引用的提交。  如果(1)提交被标签引用，或者(2)提交改变了命令行上给出的路径内容，则被标记为！TREESAME（换句话说，按照上述历史简化规则保留）。  所有其他的提交都被标记为TREESAME（会被简化掉）。

note: type: Title ~
en: Bisection Helpers
zh_HANS-CN: 剖腹产助手

note: type: Plain text
en: Limit output to the one commit object which is roughly halfway between included and excluded commits. Note that the bad bisection ref `refs/bisect/bad` is added to the included commits (if it exists) and the good bisection refs `refs/bisect/good-*` are added to the excluded commits (if they exist). Thus, supposing there are no refs in `refs/bisect/`, if
zh_HANS-CN: 将输出限制在一个提交对象上，该对象大致在包含和排除的提交之间。请注意，坏的分界参考`refs/bisect/bad`会被添加到包含的提交中（如果它存在的话），好的分界参考`refs/bisect/good-*`会被添加到排除的提交中（如果它们存在的话）。因此，假设`refs/bisect/`中没有参考文献，如果

note: type: Plain text
en: outputs 'midpoint', the output of the two commands
zh_HANS-CN: 输出'midpoint'，即两个命令的输出。

note: type: Plain text
en: would be of roughly the same length.  Finding the change which introduces a regression is thus reduced to a binary search: repeatedly generate and test new 'midpoint's until the commit chain is of length one.
zh_HANS-CN: 的长度大致相同。  因此，找到引入回归的变化就变成了一个二进制搜索：反复生成和测试新的 "中点"，直到提交链的长度为1。

note: type: Plain text
en: This calculates the same as `--bisect`, except that refs in `refs/bisect/` are not used, and except that this outputs text ready to be eval'ed by the shell. These lines will assign the name of the midpoint revision to the variable `bisect_rev`, and the expected number of commits to be tested after `bisect_rev` is tested to `bisect_nr`, the expected number of commits to be tested if `bisect_rev` turns out to be good to `bisect_good`, the expected number of commits to be tested if `bisect_rev` turns out to be bad to `bisect_bad`, and the number of commits we are bisecting right now to `bisect_all`.
zh_HANS-CN: 这与`--bisect`的计算方法相同，只是不使用`refs/bisect/`中的参考文献，而且输出的文本可以被shell评估。这几行将把中点修订的名称分配给变量`bisect_rev`，并把`bisect_rev`测试后的预期提交数分配给`bisect_nr`。如果`bisect_rev'结果是好的，预计测试的提交数量为`bisect_good'，如果`bisect_rev'结果是坏的，预计测试的提交数量为`bisect_bad'，以及我们现在正在分叉的提交数量为`bisect_all'。

note: type: Plain text
en: This outputs all the commit objects between the included and excluded commits, ordered by their distance to the included and excluded commits. Refs in `refs/bisect/` are not used. The farthest from them is displayed first. (This is the only one displayed by `--bisect`.)
zh_HANS-CN: 这将输出包含的提交和排除的提交之间的所有提交对象，按照它们与包含的提交和排除的提交的距离排序。`refs/bisect/`中的参考文献不被使用。离它们最远的会先显示出来。这也是`--bisect`唯一显示的对象）。

note: type: Plain text
en: This is useful because it makes it easy to choose a good commit to test when you want to avoid to test some of them for some reason (they may not compile for example).
zh_HANS-CN: 这很有用，因为当你因为某些原因想避免测试某些提交时（例如，它们可能无法编译），可以很容易地选择一个好的提交来测试。

note: type: Plain text
en: This option can be used along with `--bisect-vars`, in this case, after all the sorted commit objects, there will be the same text as if `--bisect-vars` had been used alone.
zh_HANS-CN: 这个选项可以和`--bisect-vars`一起使用，在这种情况下，在所有排序的提交对象之后，会有和`--bisect-vars`单独使用一样的文本。

note: type: Title ~
en: Commit Ordering
zh_HANS-CN: 承诺订购

note: type: Plain text
en: By default, the commits are shown in reverse chronological order.
zh_HANS-CN: 默认情况下，提交的内容是按时间顺序倒序显示的。

note: type: Plain text
en: Show no parents before all of its children are shown, but otherwise show commits in the commit timestamp order.
zh_HANS-CN: 在显示所有子代之前不显示父代，否则按提交时间戳顺序显示提交。

note: type: Plain text
en: Show no parents before all of its children are shown, but otherwise show commits in the author timestamp order.
zh_HANS-CN: 在显示所有子代之前不显示父代，否则按作者时间戳顺序显示提交。

note: type: Plain text
en: Show no parents before all of its children are shown, and avoid showing commits on multiple lines of history intermixed.
zh_HANS-CN: 在显示所有子代之前不显示父代，并避免显示多行历史交错的提交。

note: type: Plain text
en: For example, in a commit history like this:
zh_HANS-CN: 例如，在这样的一个提交历史中。

note: type: Plain text
en: where the numbers denote the order of commit timestamps, `git rev-list` and friends with `--date-order` show the commits in the timestamp order: 8 7 6 5 4 3 2 1.
zh_HANS-CN: 其中数字表示提交时间戳的顺序，`git rev-list`和带有`--date-order`的朋友显示提交的时间戳顺序。8 7 6 5 4 3 2 1.

note: type: Plain text
en: With `--topo-order`, they would show 8 6 5 3 7 4 2 1 (or 8 7 4 2 6 5 3 1); some older commits are shown before newer ones in order to avoid showing the commits from two parallel development track mixed together.
zh_HANS-CN: 如果使用`--topo-order`，它们会显示8 6 5 3 7 4 2 1（或8 7 4 2 6 5 3 1）；一些较早的提交会显示在较新的提交之前，以避免显示两个平行开发轨道的提交混在一起。

note: type: Plain text
en: Output the commits chosen to be shown (see Commit Limiting section above) in reverse order. Cannot be combined with `--walk-reflogs`.
zh_HANS-CN: 以相反的顺序输出选择显示的提交（见上面的提交限制部分）。不能与`--walk-reflogs`结合使用。

note: type: Title ~
en: Object Traversal
zh_HANS-CN: 对象遍历

note: type: Plain text
en: These options are mostly targeted for packing of Git repositories.
zh_HANS-CN: 这些选项主要是针对Git存储库的打包。

note: type: Plain text
en: Print the object IDs of any object referenced by the listed commits.  `--objects foo ^bar` thus means ``send me all object IDs which I need to download if I have the commit object _bar_ but not _foo_''.
zh_HANS-CN: 打印列出的提交对象所引用的任何对象的ID。  `--objects foo ^bar`因此意味着`给我发送所有我需要下载的对象ID，如果我有提交对象_bar_但没有_foo_的话'。

note: type: Plain text
en: Print tree and blob ids in order of the commits. The tree and blob ids are printed after they are first referenced by a commit.
zh_HANS-CN: 按照提交的顺序打印树和blob的id。树和blob的id会在它们第一次被提交者引用后打印。

note: type: Plain text
en: Similar to `--objects`, but also print the IDs of excluded commits prefixed with a ``-'' character.  This is used by linkgit:git-pack-objects[1] to build a ``thin'' pack, which records objects in deltified form based on objects contained in these excluded commits to reduce network traffic.
zh_HANS-CN: 类似于 `--objects`，但也会打印被排除的提交物的 ID，前缀为 `-''字符。  这被 linkgit:git-pack-objects[1] 用来建立一个 "瘦身 "包，它基于这些被排除的提交中包含的对象，以删除的形式记录对象，以减少网络流量。

note: type: Plain text
en: Similar to `--objects-edge`, but it tries harder to find excluded commits at the cost of increased time.  This is used instead of `--objects-edge` to build ``thin'' packs for shallow repositories.
zh_HANS-CN: 类似于 `--objects-edge`，但它更努力地寻找被排除的提交，代价是增加时间。  它被用来代替`--objects-edge`，为浅层仓库建立 "薄 "的包。

note: type: Plain text
en: Pretend as if all trees and blobs used by the index are listed on the command line.  Note that you probably want to use `--objects`, too.
zh_HANS-CN: 假设索引使用的所有树和blobs都列在命令行中。  注意，你可能也想使用`--objects`。

note: type: Plain text
en: Only useful with `--objects`; print the object IDs that are not in packs.
zh_HANS-CN: 只对`---对象`有用；打印不在包中的对象ID。

note: type: Plain text
en: Only useful with `--objects`; print the names of the object IDs that are found. This is the default behavior.
zh_HANS-CN: 只对`---对象`有用；打印找到的对象ID的名称。这是默认行为。

note: type: Plain text
en: Only useful with `--objects`; does not print the names of the object IDs that are found. This inverts `--object-names`. This flag allows the output to be more easily parsed by commands such as linkgit:git-cat-file[1].
zh_HANS-CN: 只对`--对象`有用；不打印找到的对象ID的名称。这与`--object-names`相反。这个标志允许输出更容易被linkgit:git-cat-file[1]等命令解析。

note: type: Plain text
en: Only useful with one of the `--objects*`; omits objects (usually blobs) from the list of printed objects.  The '<filter-spec>' may be one of the following:
zh_HANS-CN: 只对其中一个`--objects*`有用；从打印对象列表中省略对象（通常是blobs）。  <filter-spec>'可以是下列之一。

note: type: Plain text
en: The form '--filter=blob:none' omits all blobs.
zh_HANS-CN: '--filter=blob:none'的形式可以省略所有的blob。

note: type: Plain text
en: The form '--filter=blob:limit=<n>[kmg]' omits blobs larger than n bytes or units.  n may be zero.  The suffixes k, m, and g can be used to name units in KiB, MiB, or GiB.  For example, 'blob:limit=1k' is the same as 'blob:limit=1024'.
zh_HANS-CN: '--filter=blob:limit=<n>[kmg]'的形式可以省略大于n个字节或单位的blob，n可以是0。  后缀k、m和g可以用来命名KiB、MiB或GiB等单位。  例如，'blob:limit=1k'和'blob:limit=1024'是一样的。

note: type: Plain text
en: The form '--filter=object:type=(tag|commit|tree|blob)' omits all objects which are not of the requested type.
zh_HANS-CN: '--filter=object:type=(tag|commit|tree|blob)'的形式会省略所有不属于请求类型的对象。

note: type: Plain text
en: The form '--filter=tree:<depth>' omits all blobs and trees whose depth from the root tree is >= <depth> (minimum depth if an object is located at multiple depths in the commits traversed). <depth>=0 will not include any trees or blobs unless included explicitly in the command-line (or standard input when --stdin is used). <depth>=1 will include only the tree and blobs which are referenced directly by a commit reachable from <commit> or an explicitly-given object. <depth>=2 is like <depth>=1 while also including trees and blobs one more level removed from an explicitly-given commit or tree.
zh_HANS-CN: '--filter=tree:<depth>'的形式省略了所有从根树开始深度>=<depth>（如果一个对象在所穿越的提交中位于多个深度，则为最小深度）的blobs和树。<depth>=0 将不包括任何树或blobs，除非在命令行中明确包括（或使用-stdin时的标准输入）。<depth>=1 将只包括由<commit>或明确指定的对象所能到达的提交直接引用的树和blobs。<深度>=2与<深度>=1类似，同时也包括从明确给出的提交或树中移出的多一级的树和blobs。

note: type: Plain text
en: Note that the form '--filter=sparse:path=<path>' that wants to read from an arbitrary path on the filesystem has been dropped for security reasons.
zh_HANS-CN: 注意，出于安全原因，想要从文件系统上的任意路径读取的'--过滤器=sparse:path=<path>'形式已经被放弃了。

note: type: Plain text
en: Multiple '--filter=' flags can be specified to combine filters. Only objects which are accepted by every filter are included.
zh_HANS-CN: 可以指定多个'--过滤器='标志来组合过滤器。只有那些被每个过滤器接受的对象才会被包括在内。

note: type: Plain text
en: The form '--filter=combine:<filter1>+<filter2>+...<filterN>' can also be used to combined several filters, but this is harder than just repeating the '--filter' flag and is usually not necessary. Filters are joined by '{plus}' and individual filters are %-encoded (i.e. URL-encoded).  Besides the '{plus}' and '%' characters, the following characters are reserved and also must be encoded: `~!@#$^&*()[]{}\;",<>?`+&#39;&#96;+ as well as all characters with ASCII code &lt;= `0x20`, which includes space and newline.
zh_HANS-CN: '--filter=combine:<filter1>+<filter2>+...<filterN>'的形式也可以用来组合几个过滤器，但这比重复'--filter'标志要难，通常没有必要。过滤器用'{plus}'连接，单个过滤器用%编码（即用URL编码）。  除了'{plus}'和'%'字符，以下字符是保留字符，也必须进行编码：`~！@#$^&*()[]{}/;",<>?`+&#39;&#96;+以及所有ASCII代码为&lt;=`0x20`的字符，其中包括空格和换行。

note: type: Plain text
en: Other arbitrary characters can also be encoded. For instance, 'combine:tree:3+blob:none' and 'combine:tree%3A3+blob%3Anone' are equivalent.
zh_HANS-CN: 其他任意的字符也可以被编码。例如，'combined:tree:3+blob:none'和'combined:tree%3A3+blob%3Anone'是等同的。

note: type: Plain text
en: Turn off any previous `--filter=` argument.
zh_HANS-CN: 关掉之前的任何`--filter=`参数。

note: type: Plain text
en: Filter the list of explicitly provided objects, which would otherwise always be printed even if they did not match any of the filters. Only useful with `--filter=`.
zh_HANS-CN: 过滤明确提供的对象的列表，否则，即使它们不符合任何过滤器，也会被打印出来。只对`--filter=`有用。

note: type: Plain text
en: Only useful with `--filter=`; prints a list of the objects omitted by the filter.  Object IDs are prefixed with a ``~'' character.
zh_HANS-CN: 只对`--filter=`有用；打印出被过滤器省略的对象的列表。  对象ID的前缀是``~''字符。

note: type: Plain text
en: The form '--missing=error' requests that rev-list stop with an error if a missing object is encountered.  This is the default action.
zh_HANS-CN: 形式'--missing=error'要求rev-list在遇到丢失的对象时以错误方式停止。  这是默认动作。

note: type: Plain text
en: The form '--missing=allow-any' will allow object traversal to continue if a missing object is encountered.  Missing objects will silently be omitted from the results.
zh_HANS-CN: '--missing=allow-any'的形式将允许在遇到缺失对象时继续进行对象遍历。  缺少的对象将被默默地从结果中省略掉。

note: type: Plain text
en: The form '--missing=allow-promisor' is like 'allow-any', but will only allow object traversal to continue for EXPECTED promisor missing objects.  Unexpected missing objects will raise an error.
zh_HANS-CN: '--missing=allow-promisor'的形式与'allow-any'相似，但只允许对预期的promisor缺失对象继续进行遍历。  意外的缺失对象将引发一个错误。

note: type: Plain text
en: The form '--missing=print' is like 'allow-any', but will also print a list of the missing objects.  Object IDs are prefixed with a ``?'' character.
zh_HANS-CN: '--missing=print'的形式与'allow-any'相似，但也会打印出遗失对象的列表。  对象ID的前缀是"？"。

note: type: Plain text
en: (For internal use only.)  Prefilter object traversal at promisor boundary.  This is used with partial clone.  This is stronger than `--missing=allow-promisor` because it limits the traversal, rather than just silencing errors about missing objects.
zh_HANS-CN: 仅供内部使用。）在希望者边界预过滤对象的遍历。  这是与部分克隆一起使用的。  这比`--missing=allow-promisor`更强，因为它限制了遍历，而不仅仅是消除了关于丢失对象的错误。

note: type: Plain text
en: Overrides a previous `--no-walk`.
zh_HANS-CN: 覆盖之前的`--不走'。

note: type: Title ~
en: Commit Formatting
zh_HANS-CN: 承诺格式化

note: type: Plain text
en: Using these options, linkgit:git-rev-list[1] will act similar to the more specialized family of commit log tools: linkgit:git-log[1], linkgit:git-show[1], and linkgit:git-whatchanged[1]
zh_HANS-CN: 使用这些选项，linkgit:git-rev-list[1] 的作用类似于更专业的提交日志工具系列：linkgit:git-log[1]，linkgit:git-show[1]，和linkgit:git-whatchanged[1] 。

note: type: Plain text
en: Synonym for `--date=relative`.
zh_HANS-CN: `--date=relative`的同义词。

note: type: Plain text
en: Only takes effect for dates shown in human-readable format, such as when using `--pretty`. `log.date` config variable sets a default value for the log command's `--date` option. By default, dates are shown in the original time zone (either committer's or author's). If `-local` is appended to the format (e.g., `iso-local`), the user's local time zone is used instead.
zh_HANS-CN: 只对以人类可读格式显示的日期生效，例如使用`--pretty`时。`log.date`配置变量为日志命令的`--date`选项设置默认值。默认情况下，日期显示在原始时区（提交者或作者的时区）。如果`-local`被附加到格式中（例如，`iso-local`），就会使用用户的本地时区。

note: type: Plain text
en: `--date=relative` shows dates relative to the current time, e.g. ``2 hours ago''. The `-local` option has no effect for `--date=relative`.
zh_HANS-CN: `--date=relative`显示相对于当前时间的日期，例如：`2小时前''。`--local`选项对`--date=relative`没有影响。

note: type: Plain text
en: `--date=local` is an alias for `--date=default-local`.
zh_HANS-CN: `--date=local`是`--date=default-local`的一个别名。

note: type: Plain text
en: `--date=iso` (or `--date=iso8601`) shows timestamps in a ISO 8601-like format.  The differences to the strict ISO 8601 format are:
zh_HANS-CN: `--date=iso`（或`--date=iso8601`）以类似ISO 8601的格式显示时间戳。  与严格的ISO 8601格式的区别是。

note: type: Plain text
en: a space instead of the `T` date/time delimiter
zh_HANS-CN: 用空格代替`T`日期/时间分隔符

note: type: Plain text
en: a space between time and time zone
zh_HANS-CN: 时间和时区之间的空间

note: type: Plain text
en: no colon between hours and minutes of the time zone
zh_HANS-CN: 时区的小时和分钟之间没有冒号

note: type: Plain text
en: `--date=iso-strict` (or `--date=iso8601-strict`) shows timestamps in strict ISO 8601 format.
zh_HANS-CN: `--date=iso-strict`（或`--date=iso8601-strict`）显示严格的ISO 8601格式的时间戳。

note: type: Plain text
en: `--date=rfc` (or `--date=rfc2822`) shows timestamps in RFC 2822 format, often found in email messages.
zh_HANS-CN: `--date=rfc`（或`--date=rfc2822`）显示RFC 2822格式的时间戳，经常出现在电子邮件中。

note: type: Plain text
en: `--date=short` shows only the date, but not the time, in `YYYY-MM-DD` format.
zh_HANS-CN: `--date=short`只显示日期，而不是时间，格式为`YYYY-MM-DD`。

note: type: Plain text
en: `--date=raw` shows the date as seconds since the epoch (1970-01-01 00:00:00 UTC), followed by a space, and then the timezone as an offset from UTC (a `+` or `-` with four digits; the first two are hours, and the second two are minutes). I.e., as if the timestamp were formatted with `strftime("%s %z")`).  Note that the `-local` option does not affect the seconds-since-epoch value (which is always measured in UTC), but does switch the accompanying timezone value.
zh_HANS-CN: `--date=raw`显示日期为自纪元以来的秒数（1970-01-01 00:00:00 UTC），后面是空格，然后是时区为UTC的偏移量（一个`+`或`-`的四位数字；前两位是小时，后两位是分钟）。也就是说，就像时间戳的格式为`strftime("%s %z")`)。  请注意，`-local`选项不影响自始至终的秒数值（它总是以UTC为单位），但会切换伴随的时区值。

note: type: Plain text
en: `--date=human` shows the timezone if the timezone does not match the current time-zone, and doesn't print the whole date if that matches (ie skip printing year for dates that are "this year", but also skip the whole date itself if it's in the last few days and we can just say what weekday it was).  For older dates the hour and minute is also omitted.
zh_HANS-CN: `--date=human`如果时区与当前时区不匹配，则显示时区，如果匹配则不打印整个日期（即对于 "今年 "的日期，跳过打印年份，但如果是最近几天的日期，也跳过整个日期本身，我们可以只说是哪个工作日）。  对于较早的日期，小时和分钟也被省略了。

note: type: Plain text
en: `--date=unix` shows the date as a Unix epoch timestamp (seconds since 1970).  As with `--raw`, this is always in UTC and therefore `-local` has no effect.
zh_HANS-CN: `--date=unix`显示日期为Unix纪元时间戳（自1970年以来的秒数）。  与`--raw`一样，这总是以UTC为单位，因此`--local`没有影响。

note: type: Plain text
en: `--date=default` is the default format, and is similar to `--date=rfc2822`, with a few exceptions:
zh_HANS-CN: `--date=default`是默认格式，与`--date=rfc2822`类似，但有一些例外。

note: type: Plain text
en: there is no comma after the day-of-week
zh_HANS-CN: 在星期的后面没有逗号

note: type: Plain text
en: the time zone is omitted when the local time zone is used
zh_HANS-CN: 当使用本地时区时，省略了时区。

note: type: Plain text
en: Print the contents of the commit in raw-format; each record is separated with a NUL character.
zh_HANS-CN: 以原始格式打印提交的内容；每条记录用NUL字符分隔。

note: type: Plain text
en: Print also the parents of the commit (in the form "commit parent...").  Also enables parent rewriting, see 'History Simplification' above.
zh_HANS-CN: 也可以打印提交的父类（以 "提交父类... "的形式）。  也可以启用父级改写，见上面的 "历史简化"。

note: type: Plain text
en: Print also the children of the commit (in the form "commit child...").  Also enables parent rewriting, see 'History Simplification' above.
zh_HANS-CN: 同时打印提交的子项（以 "提交子项... "的形式）。  也可以启用父级改写，见上面的 "历史简化"。

note: type: Plain text
en: Print the raw commit timestamp.
zh_HANS-CN: 打印原始提交时间戳。

note: type: Plain text
en: Mark which side of a symmetric difference a commit is reachable from.  Commits from the left side are prefixed with `<` and those from the right with `>`.  If combined with `--boundary`, those commits are prefixed with `-`.
zh_HANS-CN: 标明提交可以从对称性差异的哪一边到达。  左边的提交以`<`为前缀，右边的则以`>`为前缀。  如果与"--边界 "结合，这些提交的前缀为"-"。

note: type: Plain text
en: For example, if you have this topology:
zh_HANS-CN: 例如，如果你有这样的拓扑结构。

note: type: Plain text
en: you would get an output like this:
zh_HANS-CN: 你会得到这样的输出。

note: type: Plain text
en: Draw a text-based graphical representation of the commit history on the left hand side of the output.  This may cause extra lines to be printed in between commits, in order for the graph history to be drawn properly.  Cannot be combined with `--no-walk`.
zh_HANS-CN: 在输出的左手边绘制基于文本的提交历史图表。  这可能会导致在提交之间打印出额外的行，以便正确地绘制图形历史。  不能与`--no-walk`结合使用。

note: type: Plain text
en: This enables parent rewriting, see 'History Simplification' above.
zh_HANS-CN: 这可以使父代改写，见上面的'历史简化'。

note: type: Plain text
en: This implies the `--topo-order` option by default, but the `--date-order` option may also be specified.
zh_HANS-CN: 这意味着默认情况下是`--topo-order`选项，但也可以指定`--date-order`选项。

note: type: Plain text
en: When --graph is not used, all history branches are flattened which can make it hard to see that the two consecutive commits do not belong to a linear branch. This option puts a barrier in between them in that case. If `<barrier>` is specified, it is the string that will be shown instead of the default one.
zh_HANS-CN: 如果不使用 --graph，所有的历史分支都会被压扁，这就很难看出两个连续的提交并不属于一个线性分支。在这种情况下，该选项会在它们之间设置一个障碍。如果指定了"<barrier>"，就会显示这个字符串，而不是默认的。

note: type: Plain text
en: Print a number stating how many commits would have been listed, and suppress all other output.  When used together with `--left-right`, instead print the counts for left and right commits, separated by a tab. When used together with `--cherry-mark`, omit patch equivalent commits from these counts and print the count for equivalent commits separated by a tab.
zh_HANS-CN: 打印一个数字，说明有多少提交会被列出，并抑制所有其他输出。  当与`--左--右'一起使用时，会打印左和右的提交计数，用制表符分开。当与`--cherry-mark`一起使用时，从这些计数中省略补丁等价提交，而打印等价提交的计数，用tab分隔。

note: type: Plain text
en: Add a `Signed-off-by` trailer by the committer at the end of the commit log message.  The meaning of a signoff depends on the project to which you're committing.  For example, it may certify that the committer has the rights to submit the work under the project's license or agrees to some contributor representation, such as a Developer Certificate of Origin.  (See http://developercertificate.org for the one used by the Linux kernel and Git projects.)  Consult the documentation or leadership of the project to which you're contributing to understand how the signoffs are used in that project.
zh_HANS-CN: 在提交日志信息的末尾添加提交者的 "Signed-off-by "预告片。  签名的意义取决于你所提交的项目。  例如，它可以证明提交者有权利在项目许可下提交作品，或者同意一些贡献者的陈述，如开发者的原产地证书。  关于Linux内核和Git项目使用的证书，请参见http://developercertificate.org）。  请查阅你要贡献的项目的文档或领导层，以了解该项目如何使用签名。

note: type: Plain text
en: The --no-signoff option can be used to countermand an earlier --signoff option on the command line.
zh_HANS-CN: --no-signoff选项可以用来反驳先前在命令行上的-signoff选项。
