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

note: type: Title -
en: DATE FORMATS
zh_HANS-CN: 日期格式

note: type: Plain text
en: The `GIT_AUTHOR_DATE`, `GIT_COMMITTER_DATE` environment variables
zh_HANS-CN: `GIT_AUTHOR_DATE`, `GIT_COMMITTER_DATE` 环境变量

note: type: Plain text
en: and the `--date` option
zh_HANS-CN: 和 `--date` 选项

note: type: Plain text
en: support the following date formats:
zh_HANS-CN: 支持以下日期格式：

note: type: Labeled list
en: Git internal format
zh_HANS-CN: Git 内部格式

note: type: Plain text
en: The standard email format as described by RFC 2822, for example `Thu, 07 Apr 2005 22:13:13 +0200`.
zh_HANS-CN: 由 RFC 2822 描述的标准电子邮件格式，例如 `Thu, 07 Apr 2005 22:13:13 +0200`。

note: type: Plain text
en: In addition, the date part is accepted in the following formats: `YYYY.MM.DD`, `MM/DD/YYYY` and `DD.MM.YYYY`.
zh_HANS-CN: 此外，日期部分还接受以下格式：`YYYY.MM.DD`，`MM/DD/YYYY` 和 `DD.MM.YYYY`。

note: type: Title -
en: Raw output format
zh_HANS-CN: 原始输出格式

note: type: Plain text
en: The raw output format from "git-diff-index", "git-diff-tree", "git-diff-files" and "git diff --raw" are very similar.
zh_HANS-CN: "git-diff-index"，"git-diff-tree"，"git-diff-files" 和 "git diff --raw" 的原始输出格式非常相似。

note: type: Plain text
en: These commands all compare two sets of things; what is compared differs:
zh_HANS-CN: 这些命令都比较两组事物。但比较的内容有所不同：

note: type: Plain text
en: compares the <tree-ish> and the files on the filesystem.
zh_HANS-CN: 比较 <文件树> 和文件系统上的文件。

note: type: Labeled list
en: git-diff-index --cached <tree-ish>
zh_HANS-CN: git-diff-index --cached <文件树>

note: type: Plain text
en: compares the <tree-ish> and the index.
zh_HANS-CN: 比较 <文件树> 和索引。

note: type: Labeled list
en: git-diff-tree [-r] <tree-ish-1> <tree-ish-2> [<pattern>...]
zh_HANS-CN: git-diff-tree [-r] <文件树1> <文件树2> [<模式>...]

note: type: Plain text
en: compares the trees named by the two arguments.
zh_HANS-CN: 比较由两个参数传递的文件树。

note: type: Labeled list
en: git-diff-files [<pattern>...]
zh_HANS-CN: git-diff-files [<模式>...]

note: type: Plain text
en: The "git-diff-tree" command begins its output by printing the hash of what is being compared. After that, all the commands print one output line per changed file.
zh_HANS-CN: "git-diff-tree" 命令在最开始输出被比较对象的哈希值。之后，所有命令都会为每个更改的文件打印一个输出行。

note: type: Plain text
en: An output line is formatted this way:
zh_HANS-CN: 输出行的格式如下：

note: type: Plain text
en: That is, from the left to the right:
zh_HANS-CN: 含义如下，从左到右依次：

note: type: Plain text
en: mode for "src"; 000000 if creation or unmerged.
zh_HANS-CN: "src"（源文件）的模式；如果是新建或是未合并的，则为 000000。

note: type: Plain text
en: a space.
zh_HANS-CN: 空格。

note: type: Plain text
en: mode for "dst"; 000000 if deletion or unmerged.
zh_HANS-CN: "dst"(目标文件）的模式；如果被删除或未合并则为 000000。

note: type: Plain text
en: sha1 for "src"; 0\{40\} if creation or unmerged.
zh_HANS-CN: "src"（源文件）的 sha1 值；如果为新建或未合并则为 0\{40\}。

note: type: Plain text
en: status, followed by optional "score" number.
zh_HANS-CN: 状态，在可选值 "score" 之后。

note: type: Plain text
en: a tab or a NUL when `-z` option is used.
zh_HANS-CN: 当使用 `-z` 选项时为制表符或 NUL。

note: type: Plain text
en: path for "src"
zh_HANS-CN: "src" 的路径

note: type: Plain text
en: a tab or a NUL when `-z` option is used; only exists for C or R.
zh_HANS-CN: 使用 `-z` 选项时为制表符或 NUL；仅当状态为 C 或 R 时存在。

note: type: Plain text
en: path for "dst"; only exists for C or R.
zh_HANS-CN: "dst" 的路径；仅当状态为 C 或 R 时存在。

note: type: Plain text
en: an LF or a NUL when `-z` option is used, to terminate the record.
zh_HANS-CN: 当使用 `-z` 选项时为 LF 或 NUL，用于终止记录。

note: type: Plain text
en: Possible status letters are:
zh_HANS-CN: 可能的状态字母为：

note: type: Plain text
en: A: addition of a file
zh_HANS-CN: A：文件新增部分

note: type: Plain text
en: C: copy of a file into a new one
zh_HANS-CN: C：复制到一个新文件

note: type: Plain text
en: D: deletion of a file
zh_HANS-CN: D：文件删除部分

note: type: Plain text
en: M: modification of the contents or mode of a file
zh_HANS-CN: M：文件内容或文件模式修改

note: type: Plain text
en: R: renaming of a file
zh_HANS-CN: R：文件重命名

note: type: Plain text
en: T: change in the type of the file
zh_HANS-CN: T：文件类型改变

note: type: Plain text
en: U: file is unmerged (you must complete the merge before it can be committed)
zh_HANS-CN: U：文件未合并（你必须在提交之前完成合并）

note: type: Plain text
en: X: "unknown" change type (most probably a bug, please report it)
zh_HANS-CN: X："unknown"（未知）更改类型（可能为错误，请报告）

note: type: Plain text
en: Status letters C and R are always followed by a score (denoting the percentage of similarity between the source and target of the move or copy).  Status letter M may be followed by a score (denoting the percentage of dissimilarity) for file rewrites.
zh_HANS-CN: 状态字母 C 和 R 后面总是一个分数（表示移动或复制的源与目标之间的相似性百分比）。状态字母M后面可能有文件重写的分数（表示相异百分比）。

note: type: Plain text
en: <sha1> is shown as all 0's if a file is new on the filesystem and it is out of sync with the index.
zh_HANS-CN: 如果文件是文件系统上的新文件，并且与索引不同步，则 <sha1> 将显示为全0。

note: type: Labeled list
en: Example:
zh_HANS-CN: 例如：

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

note: type: Plain text
en: "git-diff-tree", "git-diff-files" and "git-diff --raw" can take `-c` or `--cc` option to generate diff output also for merge commits.  The output differs from the format described above in the following way:
zh_HANS-CN: "git-diff-tree"、"git-diff-files" 和 "git-diff --raw" 可以使用 `-c` 或 `--cc` 选项来生成差异输出，也可以用于合并提交。其输出与上面描述的格式有以下不同：

note: type: Plain text
en: there is a colon for each parent
zh_HANS-CN: 每个父提交都有一个冒号

note: type: Plain text
en: status is concatenated status characters for each parent
zh_HANS-CN: 状态是每个父提交的状态字符的合并

note: type: Plain text
en: no optional "score" number
zh_HANS-CN: 无可选的分数（"score"）数字

note: type: Plain text
en: tab-separated pathname(s) of the file
zh_HANS-CN: 以制表符分隔的文件路径名

note: type: Plain text
en: Examples for `-c` and `--cc` without `--combined-all-paths`:
zh_HANS-CN: 以下为带 `-c` 和 `--cc` 选项且不带 `--combined-all-paths` 选项的示例：

note: type: Plain text
en: Examples when `--combined-all-paths` added to either `-c` or `--cc`:
zh_HANS-CN: 以下为使用 `--combined-all-paths` 选项且使用 `-c` 或 `--cc` 选项的示例:

note: type: Plain text
en: Note that 'combined diff' lists only files which were modified from all parents.
zh_HANS-CN: 请注意 'combined diff' 只列出了从所有父提交中修改过的文件。

note: type: Title -
en: other diff formats
zh_HANS-CN: 其他差异格式

note: type: Plain text
en: The `--summary` option describes newly added, deleted, renamed and copied files.  The `--stat` option adds diffstat(1) graph to the output.  These options can be combined with other options, such as `-p`, and are meant for human consumption.
zh_HANS-CN: `--summary` 选项描述新添加、删除、重命名和复制的文件。`--stat` 选项将 diffstat(1) 图添加到输出中。这些选项可以与其他选项组合在一起，如 `-p` 选项可以提高可读性。

note: type: Plain text
en: When showing a change that involves a rename or a copy, `--stat` output formats the pathnames compactly by combining common prefix and suffix of the pathnames.  For example, a change that moves `arch/i386/Makefile` to `arch/x86/Makefile` while modifying 4 lines will be shown like this:
zh_HANS-CN: 当显示一个涉及到重命名或复制的更改时，`--stat` 输出会将路径名的前缀和后缀结合在一起，会以较紧凑的方式显示。例如，将 "arch/i386/Makefile" 移动到 "arch/x86/Makefile"，同时修改了4行，就会显示出这样的变化：

note: type: Plain text
en: The `--numstat` option gives the diffstat(1) information but is designed for easier machine consumption.  An entry in `--numstat` output looks like this:
zh_HANS-CN: `--numstat` 选项提供了 diffstat(1) 的信息，但其是为了方便程序使用而设计的。`--numstat` 输出中的一个条目如下：

note: type: Plain text
en: That is, from left to right:
zh_HANS-CN: 从左至右依次是：

note: type: Plain text
en: the number of added lines;
zh_HANS-CN: 添加的行数；

note: type: Plain text
en: a tab;
zh_HANS-CN: 制表符；

note: type: Plain text
en: the number of deleted lines;
zh_HANS-CN: 删除的行数；

note: type: Plain text
en: pathname (possibly with rename/copy information);
zh_HANS-CN: 路径名（可能有重命名/复制信息）；

note: type: Plain text
en: a newline.
zh_HANS-CN: 换行符。

note: type: Plain text
en: When `-z` output option is in effect, the output is formatted this way:
zh_HANS-CN: 当 `-z` 输出选项生效时，输出的格式如下：

note: type: Plain text
en: That is:
zh_HANS-CN: 依次是：

note: type: Plain text
en: a NUL (only exists if renamed/copied);
zh_HANS-CN: NUL（仅在重命名/复制时存在）；

note: type: Plain text
en: pathname in preimage;
zh_HANS-CN: 完整路径名；

note: type: Plain text
en: pathname in postimage (only exists if renamed/copied);
zh_HANS-CN: 完整路径名（仅在重命名/复制时存在）；

note: type: Plain text
en: a NUL.
zh_HANS-CN: NUL。

note: type: Plain text
en: Generate plain patches without any diffstats.
zh_HANS-CN: 生成普通的补丁，不显示差异状态（diffstats）。

note: type: Plain text
en: Generate patch (see section on generating patches).
zh_HANS-CN: 生成补丁（参阅生成补丁的相关章节）。

note: type: Plain text
en: 	This is the default.
zh_HANS-CN: 	这是默认设置。

note: type: Plain text
en: Suppress diff output. Useful for commands like `git show` that show the patch by default, or to cancel the effect of `--patch`.
zh_HANS-CN: 不输出差异（diff）。对于显示修补程序的 `git show` 等命令是默认选项，也用于取消选项 `--patch` 的效果。

note: type: Plain text
en: Generate diffs with <n> lines of context instead of the usual three. Implies `--patch`.
zh_HANS-CN: 生成带有 <n> 行上下文的差异，而不是通常的 3 行。暗含 `--patch` 选项。

note: type: Plain text
en: 	Implies `-p`.
zh_HANS-CN: 	暗含 `-p` 选项。

note: type: Labeled list
en: --output=<file>
zh_HANS-CN: --output=<文件>

note: type: Plain text
en: Output to a specific file instead of stdout.
zh_HANS-CN: 输出到一个特定的文件，而不是标准输出。

note: type: Labeled list
en: --output-indicator-new=<char>
zh_HANS-CN: --output-indicator-new=<字符>

note: type: Labeled list
en: --output-indicator-old=<char>
zh_HANS-CN: --output-indicator-old=<字符>

note: type: Labeled list
en: --output-indicator-context=<char>
zh_HANS-CN: --output-indicator-context=<字符>

note: type: Plain text
en: Specify the character used to indicate new, old or context lines in the generated patch. Normally they are '+', '-' and ' ' respectively.
zh_HANS-CN: 指定在生成的补丁中用来表示新、旧或上下文行的字符。通常它们分别是 '+'、'-' 和 ' '（空格）。

note: type: Plain text
en: 	Generate the diff in raw format.
zh_HANS-CN: 	生成原始格式的差异。

note: type: Plain text
en: 	For each commit, show a summary of changes using the raw diff
    	format. See the "RAW OUTPUT FORMAT" section of
    	linkgit:git-diff[1]. This is different from showing the log
    	itself in raw format, which you can achieve with
    	`--format=raw`.
zh_HANS-CN: 	对于每一个提交，使用原始的差异格式
    	请参见 linkgit:git-diff[1] 中
    	"原始输出格式" 一节 。
    	这与显示日志中的本身的原始格式不同
    	你可以用 `--format=raw` 来实现。

note: type: Plain text
en: Synonym for `-p --raw`.
zh_HANS-CN: `-p-raw` 的同义词。

note: type: Plain text
en: Show the tree objects in the diff output.
zh_HANS-CN: 在差异输出中显示树对象。

note: type: Plain text
en: Enable the heuristic that shifts diff hunk boundaries to make patches easier to read. This is the default.
zh_HANS-CN: 启用启发式的缩进区块的方法，使得补丁更易读。这是默认选项。

note: type: Plain text
en: Disable the indent heuristic.
zh_HANS-CN: 禁用启发式缩进。

note: type: Plain text
en: Spend extra time to make sure the smallest possible diff is produced.
zh_HANS-CN: 花费额外的时间以确保生成尽可能小的差异。

note: type: Plain text
en: Generate a diff using the "patience diff" algorithm.
zh_HANS-CN: 使用 "patience diff" 算法生成差异。

note: type: Plain text
en: Generate a diff using the "histogram diff" algorithm.
zh_HANS-CN: 使用 "histogram diff" 算法生成差异。

note: type: Labeled list
en: --anchored=<text>
zh_HANS-CN: --anchored=<文本>

note: type: Plain text
en: Generate a diff using the "anchored diff" algorithm.
zh_HANS-CN: 使用 "anchored diff" 算法生成差异。

note: type: Plain text
en: This option may be specified more than once.
zh_HANS-CN: 这个选项可以被指定多次。

note: type: Plain text
en: Choose a diff algorithm. The variants are as follows:
zh_HANS-CN: 选择差异算法。有如下可选项：

note: type: Plain text
en: The basic greedy diff algorithm. Currently, this is the default.
zh_HANS-CN: 基本的贪婪差异算法。当前是默认设置。

note: type: Plain text
en: For instance, if you configured the `diff.algorithm` variable to a non-default value and want to use the default one, then you have to use `--diff-algorithm=default` option.
zh_HANS-CN: 例如，如果你将 `diff.algorithm` 变量配置为非默认值，但希望使用默认值，那么你必须使用 `--diff-algorithm=default` 选项。

note: type: Plain text
en: These parameters can also be set individually with `--stat-width=<width>`, `--stat-name-width=<name-width>` and `--stat-count=<count>`.
zh_HANS-CN: 这些参数也可以用 `--stat-width=<宽度>`，`--stat-name-width=<名称宽度>` 和 `--stat-count=<数量>` 单独设置。

note: type: Plain text
en: Output a condensed summary of extended header information such as file creations or deletions ("new" or "gone", optionally "+l" if it's a symlink) and mode changes ("+x" or "-x" for adding or removing executable bit respectively) in diffstat. The information is put between the filename part and the graph part. Implies `--stat`.
zh_HANS-CN: 在差异状态中输出扩展头信息的压缩摘要，如文件的创建或删除（"new " 或 "good"。如果是符号链接，则为 "+l"）和模式变化（"+x" 或 "-x" 分别用于添加或删除可执行位）。这些信息被放在文件名部分和图形部分之间。暗含 `--stat` 选项。

note: type: Plain text
en: Similar to `--stat`, but shows number of added and deleted lines in decimal notation and pathname without abbreviation, to make it more machine friendly.  For binary files, outputs two `-` instead of saying `0 0`.
zh_HANS-CN: 类似于 `--stat`，但是使用小数点和不含缩写的路径名显示添加和删除的行数，使其对程序更友好。对于二进制文件，输出两个 `-`，而不是 `0 0`。

note: type: Plain text
en: Output only the last line of the `--stat` format containing total number of modified files, as well as number of added and deleted lines.
zh_HANS-CN: 只输出使用 `--stat` 选项输出的最后一行，包含修改的文件总数，添加和删除的行数。

note: type: Labeled list
en: -X[<param1,param2,...>]
zh_HANS-CN: -X[<参数1,参数2,...>]

note: type: Labeled list
en: --dirstat[=<param1,param2,...>]
zh_HANS-CN: --dirstat[=<参数1,参数2,...>]

note: type: Plain text
en: Output the distribution of relative amount of changes for each sub-directory. The behavior of `--dirstat` can be customized by passing it a comma separated list of parameters.  The defaults are controlled by the `diff.dirstat` configuration variable (see linkgit:git-config[1]).  The following parameters are available:
zh_HANS-CN: 输出每个子目录的相对变化量的分布。`--dirstat` 的行为可以通过传递一个以逗号分隔的参数列表来自定义。默认值由`diff.dirstat` 配置变量控制 (参见 linkgit:git-config[1])。以下是可用的参数：

note: type: Plain text
en: Compute the dirstat numbers by counting the lines that have been removed from the source, or added to the destination. This ignores the amount of pure code movements within a file.  In other words, rearranging lines in a file is not counted as much as other changes.  This is the default behavior when no parameter is given.
zh_HANS-CN: 通过计算从源文件中删除的行数或添加到目标文件中的行数来计算分布状态的数字。这忽略了文件内的代码移动行为。也就是说，在文件中重新排列的行不会像其他变化一样被计算在内。这是在没有给出参数时的默认行为。

note: type: Plain text
en: Compute the dirstat numbers by doing the regular line-based diff analysis, and summing the removed/added line counts. (For binary files, count 64-byte chunks instead, since binary files have no natural concept of lines). This is a more expensive `--dirstat` behavior than the `changes` behavior, but it does count rearranged lines within a file as much as other changes. The resulting output is consistent with what you get from the other `--*stat` options.
zh_HANS-CN: 通过做常规基于行的差异分析，计算分布状态的数字，并将删除/添加的行数相加。(对于二进制文件，用64字节的块来计算，因为二进制文件没有行的概念)。在使用 `--dirstat` 时这个选项的行为开销比 `changes` 更大，但会对文件中重新排列的行进行计数。其得到的输出结果与其他的 `--*stat` 选项一致。

note: type: Plain text
en: Compute the dirstat numbers by counting the number of files changed.  Each changed file counts equally in the dirstat analysis. This is the computationally cheapest `--dirstat` behavior, since it does not have to look at the file contents at all.
zh_HANS-CN: 通过计算被改变的文件数量来计算分布状态的数字。在分布状态分析中，每一个被改变的文件都会被平等地计算。这是计算上开销最小的 `--dirstat` 行为，因为它无需查看文件内容。

note: type: Plain text
en: Count changes in a child directory for the parent directory as well.  Note that when using `cumulative`, the sum of the percentages reported may exceed 100%. The default (non-cumulative) behavior can be specified with the `noncumulative` parameter.
zh_HANS-CN: 子目录中的变化计算到父目录中。 注意，当使用 `cumulative` 选项时，报告的百分比之和可能超过100%。默认的（非累积）行为可以用 `noncumulative` 参数指定。

note: type: Labeled list
en: <limit>
zh_HANS-CN: <限制>

note: type: Plain text
en: An integer parameter specifies a cut-off percent (3% by default).  Directories contributing less than this percentage of the changes are not shown in the output.
zh_HANS-CN: 一个整数参数，其指定一个截止百分比（默认为3%）。贡献值小于这个百分比的目录不显示在输出中。

note: type: Plain text
en: Example: The following will count changed files, while ignoring directories with less than 10% of the total amount of changed files, and accumulating child directory counts in the parent directories: `--dirstat=files,10,cumulative`.
zh_HANS-CN: 例如：下面的参数会统计更改的文件，同时忽略占更改文件总数10%以下的目录，并累积父目录中的子目录计数：`--dirstat=files,10,cumulative`。

note: type: Plain text
en: Synonym for --dirstat=cumulative
zh_HANS-CN: --dirstat=cumulative 的同义词。

note: type: Labeled list
en: --dirstat-by-file[=<param1,param2>...]
zh_HANS-CN: --dirstat-byfile[=<参数1,参数2>...]

note: type: Plain text
en: Synonym for --dirstat=files,param1,param2...
zh_HANS-CN: --dirstat=files,param1,param2... 的同义词。

note: type: Plain text
en: Output a condensed summary of extended header information such as creations, renames and mode changes.
zh_HANS-CN: 输出扩展头信息，如创建、重命名和模式变化等，的压缩摘要。

note: type: Plain text
en: 	Separate the commits with NULs instead of with new newlines.
zh_HANS-CN: 	用 NUL 而不是用换行来分隔提交。

note: type: Plain text
en: Also, when `--raw` or `--numstat` has been given, do not munge pathnames and use NULs as output field terminators.
zh_HANS-CN: 另外，当给出 `--raw` 或 `--numstat` 时，不合并路径名，并使用 NUL 作为输出字段终止符。

note: type: Plain text
en: 	When `--raw`, `--numstat`, `--name-only` or `--name-status` has been
    	given, do not munge pathnames and use NULs as output field terminators.
zh_HANS-CN: 	另外，当给出 `--raw` 或 `--numstat` 时，
    	不合并路径名，并使用 NUL 作为输出字段终止符。

note: type: Plain text
en: Show only names of changed files.
zh_HANS-CN: 仅显示已更改文件的名称。

note: type: Plain text
en: Show only names and status of changed files. See the description of the `--diff-filter` option on what the status letters mean.
zh_HANS-CN: 仅显示已更改文件的名称和状态。有关状态字母的含义，请参阅 `--diff-filter` 选项的说明。

note: type: Labeled list
en: --submodule[=<format>]
zh_HANS-CN: --submodule[=<格式>]

note: type: Plain text
en: Specify how differences in submodules are shown.  When specifying `--submodule=short` the 'short' format is used.  This format just shows the names of the commits at the beginning and end of the range.  When `--submodule` or `--submodule=log` is specified, the 'log' format is used.  This format lists the commits in the range like linkgit:git-submodule[1] `summary` does.  When `--submodule=diff` is specified, the 'diff' format is used.  This format shows an inline diff of the changes in the submodule contents between the commit range.  Defaults to `diff.submodule` or the 'short' format if the config option is unset.
zh_HANS-CN: 指定子模块中的差异如何显示。当指定 `--submodule=short` 选项时，会使用 'short' 格式。这种格式只显示范围的开头和结尾处的提交名称。当指定了 `--submodule=short` 或  `--submodule=log` 时，会使用 'log' 格式。这种格式会像 linkgit:git-submodule[1]  `summary` 那样，列出该范围内的提交。当指定了 `--submodule=diff` 时，会使用 'diff' 格式。这个格式显示的是子模块内在提交范围之间的变化差异。默认为 `diff.submodule`，如果配置选项未设置， 则为 `short` 格式。

note: type: Labeled list
en: --color[=<when>]
zh_HANS-CN: --color[=<何时>]

note: type: Plain text
en: Show colored diff.  `--color` (i.e. without '=<when>') is the same as `--color=always`.  '<when>' can be one of `always`, `never`, or `auto`.
zh_HANS-CN: 显示有颜色的差异。`--color`（即不含 '=<何时>'）与 `--color=always` 相同。'<何时>' 可以是 `always`、`never` 或 `auto`。

note: type: Plain text
en: 	It can be changed by the `color.ui` and `color.diff`
    	configuration settings.
zh_HANS-CN: 	它可以通过 `color.ui` 和 `color.diff` 来改变
    	配置设置。

note: type: Plain text
en: Turn off colored diff.
zh_HANS-CN: 关掉带彩色显示的差异。

note: type: Plain text
en: 	This can be used to override configuration settings.
zh_HANS-CN: 	这可以用来覆盖配置设置。

note: type: Plain text
en: 	It is the same as `--color=never`.
zh_HANS-CN: 	这和 `--color=never` 相同。

note: type: Labeled list
en: --color-moved[=<mode>]
zh_HANS-CN: --color-moved[=<模式>]

note: type: Plain text
en: Moved lines of code are colored differently.
zh_HANS-CN: 移动的代码行的颜色不同。

note: type: Plain text
en: 	It can be changed by the `diff.colorMoved` configuration setting.
zh_HANS-CN: 	它可以通过 `diff.colorMoved` 配置设置来改变。

note: type: Plain text
en: 	The <mode> defaults to 'no' if the option is not given
    	and to 'zebra' if the option with no mode is given.
    	The mode must be one of:
zh_HANS-CN: 	如果没有给出该选项，<模式> 默认为 'no'
    	如果没有给定模式选项，则为 'zebra'。
    	该模式必须以下其中之一：

note: type: Plain text
en: Moved lines are not highlighted.
zh_HANS-CN: 被移动的行不突出显示。

note: type: Plain text
en: Is a synonym for `zebra`. This may change to a more sensible mode in the future.
zh_HANS-CN: 是 `zebra` 的同义词。今后可能会改成更合理的模式。

note: type: Plain text
en: Blocks of moved text of at least 20 alphanumeric characters are detected greedily. The detected blocks are painted using either the 'color.diff.{old,new}Moved' color.  Adjacent blocks cannot be told apart.
zh_HANS-CN: 使用贪心方法检测含至少20个字母数字字符的移动文本块。检测到的区块使用 'color.diff.{old,new}Moved' 的颜色。相邻的区块不能被区分开。

note: type: Plain text
en: Blocks of moved text are detected as in 'blocks' mode. The blocks are painted using either the 'color.diff.{old,new}Moved' color or 'color.diff.{old,new}MovedAlternative'. The change between the two colors indicates that a new block was detected.
zh_HANS-CN: 在“块”模式下检测到移动的文本块。块使用 'color.diff.{old,new}Moved' 颜色或 'color.diff.{old,new}MovedAlternative' 颜色。这两种颜色之间的变化表示检测到了新的块。

note: type: Plain text
en: Similar to 'zebra', but additional dimming of uninteresting parts of moved code is performed. The bordering lines of two adjacent blocks are considered interesting, the rest is uninteresting.  `dimmed_zebra` is a deprecated synonym.
zh_HANS-CN: 类似于  'zebra' 模式，但对=使移动的代码中不关注的部分变暗。相邻两个区块的边界线被认为是重要，其余的部分是无关紧要的。`dimmed_zebra` 是一个被废弃的同义词。

note: type: Plain text
en: Turn off move detection. This can be used to override configuration settings. It is the same as `--color-moved=no`.
zh_HANS-CN: 关闭移动检测。这可以用来覆盖配置设置。它与 `--color-moved=no` 相同。

note: type: Labeled list
en: --color-moved-ws=<modes>
zh_HANS-CN: --color-moved-ws=<模式>

note: type: Plain text
en: This configures how whitespace is ignored when performing the move detection for `--color-moved`.
zh_HANS-CN: 这将配置在执行 `--color-moved` 的移动检测时如何忽略空格。

note: type: Plain text
en: 	It can be set by the `diff.colorMovedWS` configuration setting.
zh_HANS-CN: 	可以通过 `diff.colorMovedWS` 来设置。

note: type: Plain text
en: 	These modes can be given as a comma separated list:
zh_HANS-CN: 	这些模式可以通过以逗号分隔的列表给出：

note: type: Plain text
en: Do not ignore whitespace when performing move detection.
zh_HANS-CN: 执行移动检测时不忽略空格。

note: type: Plain text
en: Ignore changes in whitespace at EOL.
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: Initially ignore any whitespace in the move detection, then group the moved code blocks only into a block if the change in whitespace is the same per line. This is incompatible with the other modes.
zh_HANS-CN: 在最初移动检测中忽略的任何空格，然后只在每行的空格变化相同的情况下，将移动的代码块归为一个块。这与其他模式是不兼容的。

note: type: Plain text
en: Do not ignore whitespace when performing move detection. This can be used to override configuration settings. It is the same as `--color-moved-ws=no`.
zh_HANS-CN: 执行移动检测时，不忽略空格。这可以用来覆盖配置。它与 `--color-moved-ws=no` 相同。

note: type: Labeled list
en: --word-diff[=<mode>]
zh_HANS-CN: --word-diff[=<模式>]

note: type: Plain text
en: Show a word diff, using the <mode> to delimit changed words.  By default, words are delimited by whitespace; see `--word-diff-regex` below.  The <mode> defaults to 'plain', and must be one of:
zh_HANS-CN: 显示词的差异，用 <模式> 来分隔已更改的词。默认情况下，单词是以空格分隔；请参考 `--word-diff-regex`。<模式> 默认为 `plain`，并且必须是以下其中之一：

note: type: Plain text
en: Highlight changed words using only colors.  Implies `--color`.
zh_HANS-CN: 只用颜色突出显示已更改的单词。暗含 `--color` 选项。

note: type: Plain text
en: Show words as `[-removed-]` and `{+added+}`.  Makes no attempts to escape the delimiters if they appear in the input, so the output may be ambiguous.
zh_HANS-CN: 显示更改的词为 `[-removed-]` 和 `{+added+}`。如果在输入中出现定界符，则不尝试转义，所以输出可能是多义的。

note: type: Plain text
en: Disable word diff again.
zh_HANS-CN: 再次禁用单词差异模式。

note: type: Plain text
en: Note that despite the name of the first mode, color is used to highlight the changed parts in all modes if enabled.
zh_HANS-CN: 请注意，无论第一个模式的名称是什么，如果启用该选项，将在所有模式中使用颜色，以高亮显示更改的部分。

note: type: Labeled list
en: --word-diff-regex=<regex>
zh_HANS-CN: --word-diff-regex=<正则表达式>

note: type: Plain text
en: Use <regex> to decide what a word is, instead of considering runs of non-whitespace to be a word.  Also implies `--word-diff` unless it was already enabled.
zh_HANS-CN: 使用 <正则表达式> 来确定单词的格式，而不是将一串非空白行视为单词。除非已启用，否则还暗含 `--word-diff` 选项。

note: type: Plain text
en: For example, `--word-diff-regex=.` will treat each character as a word and, correspondingly, show differences character by character.
zh_HANS-CN: 例如，`--word-diff-regex=.` 将把每个字符当作一个单词，并相应地逐个字符显示差异。

note: type: Plain text
en: The regex can also be set via a diff driver or configuration option, see linkgit:gitattributes[5] or linkgit:git-config[1].  Giving it explicitly overrides any diff driver or configuration setting.  Diff drivers override configuration settings.
zh_HANS-CN: 正则表达式也可以通过差异程序或配置选项来设置，参见 linkgit:gitattributes[5] 或 linkgit:git-config[1]。显式指明会覆盖任何程序或配置。差异程序会覆盖配置。

note: type: Labeled list
en: --color-words[=<regex>]
zh_HANS-CN: --color-words[=<正则表达式>]

note: type: Plain text
en: Equivalent to `--word-diff=color` plus (if a regex was specified) `--word-diff-regex=<regex>`.
zh_HANS-CN: 与 `--word-diff=color` 和（如果指明了正则表达式）`--word-diff-regex=<正则表达式>` 两个选项含义相同。

note: type: Plain text
en: Warn if changes introduce conflict markers or whitespace errors.  What are considered whitespace errors is controlled by `core.whitespace` configuration.  By default, trailing whitespaces (including lines that consist solely of whitespaces) and a space character that is immediately followed by a tab character inside the initial indent of the line are considered whitespace errors.  Exits with non-zero status if problems are found. Not compatible with --exit-code.
zh_HANS-CN: 如果更改引入冲突标记或空格错误，则发出警告。哪些被认为是空格错误是由 `core.whitespace` 配置控制的。默认情况下，行尾部的空格字符（包括仅由空格字符组成的行）和紧跟在行初缩进内 tab 字符后的空格字符，都被认为是空格字符错误。如果发现问题，则以非零状态退出。与 --exit-code 选项不兼容。

note: type: Labeled list
en: --ws-error-highlight=<kind>
zh_HANS-CN: --ws-error-highlight=<种类>

note: type: Plain text
en: Highlight whitespace errors in the `context`, `old` or `new` lines of the diff.  Multiple values are separated by comma, `none` resets previous values, `default` reset the list to `new` and `all` is a shorthand for `old,new,context`.  When this option is not given, and the configuration variable `diff.wsErrorHighlight` is not set, only whitespace errors in `new` lines are highlighted. The whitespace errors are colored with `color.diff.whitespace`.
zh_HANS-CN: 突出显示差异中 `context`（上下文）、`old`（旧）或 `new`（新）行中的空格错误。多个值用逗号隔开，`none` 选项会重置以前的值，`default` 重置列表为 ·new`，`all` 是 `old,new,context` 的简写。当没有给定这个选项，并且配置变量 `diff.wsErrorHighlight``没有设置时，只有 `new` 行中的空格错误会被高亮显示。空格错误会用 `color.diff.whitespace` 配置进行着色。

note: type: Plain text
en: Instead of the first handful of characters, show the full pre- and post-image blob object names on the "index" line when generating patch format output.
zh_HANS-CN: 在生成补丁格式输出时，在 `index`（索引）行上显示完整的图像前和图像后数据对象名称，而不仅是前几个字符。

note: type: Plain text
en: In addition to `--full-index`, output a binary diff that can be applied with `git-apply`. Implies `--patch`.
zh_HANS-CN: 除了 `--full-index`输出的差异之外，输出二进制的差异。其可以用 `git-apply` 命令来应用。暗含 `--patch` 选项。

note: type: Plain text
en: Break complete rewrite changes into pairs of delete and create. This serves two purposes:
zh_HANS-CN: 将完整的重写更改切分成删除和创建对（pair）。这有两个目的：

note: type: Plain text
en: 	Detect renames.
zh_HANS-CN: 	重命名检测。

note: type: Plain text
en: 	If generating diffs, detect and report renames for each commit.
    	For following files across renames while traversing history, see
    	`--follow`.
zh_HANS-CN: 	如果制成差异，检测并报告每个提交中的重命名。
    	对于每个在遍历历史时重命名的文件，参见
    	`--follow`。

note: type: Plain text
en: Detect copies as well as renames.  See also `--find-copies-harder`.  If `n` is specified, it has the same meaning as for `-M<n>`.
zh_HANS-CN: 检测复制与重命名。参见 `--find-copies-harder`。如果指定了 `n`，则其与 `-M<n>` 含义相同。

note: type: Labeled list
en: --depth=<depth>
zh_HANS-CN: --depth=<深度>

note: type: Plain text
en: Be verbose.
zh_HANS-CN: 冗余模式。

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: Plain text
en: 'git add' [--verbose | -v] [--dry-run | -n] [--force | -f] [--interactive | -i] [--patch | -p]
    	  [--edit | -e] [--[no-]all | --[no-]ignore-removal | [--update | -u]]
    	  [--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing] [--renormalize]
    	  [--chmod=(+|-)x] [--pathspec-from-file=<file> [--pathspec-file-nul]]
    	  [--] [<pathspec>...]
zh_HANS-CN: 'git add' [--verbose | -v] [--dry-run | -n] [--force | -f] [--interactive | -i] [--patch | -p]
    	  [--edit | -e] [--[no-]all | --[no-]ignore-removal | [--update | -u]]
    	  [--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing] [--renormalize]
    	  [--chmod=(+|-)x] [--pathspec-from-file=<文件> [--pathspec-file-nul]]
    	  [--] [<指定路径>...]

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: “索引”保存着工作树内容的快照，该快照作为下一次提交的内容。因此，在对工作树进行任何更改之后，以及在运行commit命令之前，必须使用`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: Don't actually add the file(s), just show if they exist and/or will be ignored.
zh_HANS-CN: 实际上不添加文件，仅展示文件是否存在或是否忽略。

note: type: Plain text
en: Allow adding otherwise ignored files.
zh_HANS-CN: 允许添加已被忽略的文件。

note: type: Plain text
en: Add modified contents in the working tree interactively to the index. Optional path arguments may be supplied to limit operation to a subset of the working tree. See ``Interactive mode'' for details.
zh_HANS-CN: 以交互方式将工作树中的修改内容添加到索引。可以提供可选的路径参数，以将操作限制为工作树的子集。有关详细信息，请参见``交互模式''。

note: type: Plain text
en: Interactively choose hunks of patch between the index and the work tree and add them to the index. This gives the user a chance to review the difference before adding modified contents to the index.
zh_HANS-CN: 交互地在索引和工作树之间选择补丁块并将它们添加到索引中。这让用户有机会在将修改后的内容添加到索引之前查看差异。

note: type: Plain text
en: This effectively runs `add --interactive`, but bypasses the initial command menu and directly jumps to the `patch` subcommand.  See ``Interactive mode'' for details.
zh_HANS-CN: 这可以有效地运行 `add --interactive`，但是会绕过初始命令菜单，而直接跳转到 `patch` 子命令。有关详细信息，请参见``交互模式''。

note: type: Plain text
en: Open the diff vs. the index in an editor and let the user edit it.  After the editor was closed, adjust the hunk headers and apply the patch to the index.
zh_HANS-CN: 在编辑器中打开与索引的差异，使用户进行编辑。关闭编辑器后，调整块补丁头并将其应用于索引。

note: type: Plain text
en: The intent of this option is to pick and choose lines of the patch to apply, or even to modify the contents of lines to be staged. This can be quicker and more flexible than using the interactive hunk selector.  However, it is easy to confuse oneself and create a patch that does not apply to the index. See EDITING PATCHES below.
zh_HANS-CN: 此选项的目的是选择并选择要应用的补丁的行，甚至修改要暂存的行的内容。与使用交互式补丁块选择器相比，其更快，更灵活。但是，很容易混淆自己并创建不应用于索引的补丁。请参阅下面的编辑补丁。

note: type: Plain text
en: Update the index just where it already has an entry matching <pathspec>.  This removes as well as modifies index entries to match the working tree, but adds no new files.
zh_HANS-CN: 在索引已经有与 <指定路径> 匹配项的地方更新索引。这会删除和修改索引项以匹配工作树，但不添加新文件。

note: type: Plain text
en: If no <pathspec> is given when `-u` option is used, all tracked files in the entire working tree are updated (old versions of Git used to limit the update to the current directory and its subdirectories).
zh_HANS-CN: 如果在使用 `-u` 选项时没有 <指定路径>，则整个工作树中的所有跟踪文件都将更新（旧版本 Git 会限制更新当前目录及其子目录）。

note: type: Plain text
en: Update the index not only where the working tree has a file matching <pathspec> but also where the index already has an entry. This adds, modifies, and removes index entries to match the working tree.
zh_HANS-CN: 不仅在工作树中有与 <指定路径 >匹配的文件的地方更新索引，而且在索引中已经有一个项的地方更新索引。这将添加、修改和删除与工作树匹配的索引项。

note: type: Plain text
en: If no <pathspec> is given when `-A` option is used, all files in the entire working tree are updated (old versions of Git used to limit the update to the current directory and its subdirectories).
zh_HANS-CN: 如果在使用 `-A` 选项时没有 <指定路径>，则整个工作树中的所有文件都将更新（旧版本的 Git 会限制当前目录及其子目录的更新）。

note: type: Plain text
en: Update the index by adding new files that are unknown to the index and files modified in the working tree, but ignore files that have been removed from the working tree.  This option is a no-op when no <pathspec> is used.
zh_HANS-CN: 通过添加索引未知的新文件和在工作树中修改的文件以更新索引，但忽略已从工作树中删除的文件。当不使用 <指定路径> 时，此选项是必须的。

note: type: Plain text
en: This option is primarily to help users who are used to older versions of Git, whose "git add <pathspec>..." was a synonym for "git add --no-all <pathspec>...", i.e. ignored removed files.
zh_HANS-CN: 此选项主要用于帮助那些习惯于较旧版本 Git 的用户。旧版本中的 "Git add<指定路径>..." 是 "Git add--no all<指定路径>..." 的同义词，即忽略已删除的文件。

note: type: Plain text
en: Record only the fact that the path will be added later. An entry for the path is placed in the index with no content. This is useful for, among other things, showing the unstaged content of such files with `git diff` and committing them with `git commit -a`.
zh_HANS-CN: 只记录稍后将添加路径的事实。路径的项会被放置在索引中，但不包括改动的内容。这对于使用 `git diff` 显示文件的未暂存内容以及使 `git commit -a` 提交这些文件非常有用。

note: type: Plain text
en: Don't add the file(s), but only refresh their stat()  information in the index.
zh_HANS-CN: 不添加文件，只刷新索引中的 stat() 信息。

note: type: Plain text
en: If some files could not be added because of errors indexing them, do not abort the operation, but continue adding the others. The command shall still exit with non-zero status.  The configuration variable `add.ignoreErrors` can be set to true to make this the default behaviour.
zh_HANS-CN: 如果由于索引错误而无法添加某些文件，请不要中止操作，而是继续添加其他文件。命令仍应以非零状态退出。可以将配置变量`add.ignoreErrors`设置为true，使其成为默认行为。

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: Override the executable bit of the added files.  The executable bit is only changed in the index, the files on disk are left unchanged.
zh_HANS-CN: 重写添加文件的可执行位。可执行位仅在索引中更改，磁盘上的文件保持不变。

note: type: Plain text
en: Pathspec is passed in `<file>` instead of commandline args. If `<file>` is exactly `-` then standard input is used. Pathspec elements are separated by LF or CR/LF. Pathspec elements can be quoted as explained for the configuration variable `core.quotePath` (see linkgit:git-config[1]). See also `--pathspec-file-nul` and global `--literal-pathspecs`.
zh_HANS-CN: Pathspec在 `<file>` 中传递，而不是在命令行参数中传递。如果 `<file>` 正好是 `-`，则使用标准输入。Pathspec 元素由 LF 或 CR/LF 分隔。可以引用配置变量 `core.quotePath` 的 Pathspec 元素（请参见 linkgit:git config[1]）。另请参见 `--pathspec-file-nul `和全局 `--literal-pathspecs`。

note: type: Plain text
en: Only meaningful with `--pathspec-from-file`. Pathspec elements are separated with NUL character and all other characters are taken literally (including newlines and quotes).
zh_HANS-CN: 只有在使用 `--pathspec-from-file` 时才有意义。指定路径元素用 NUL 字符分隔，所有其他字符都按字面意思（包括换行符和引号）表示。

note: type: Plain text
en: This option can be used to separate command-line options from the list of files, (useful when filenames might be mistaken for command-line options).
zh_HANS-CN: 此选项可用于分离命令行选项和文件列表（当文件名可能被误认为命令行选项时非常有用）。

note: type: Title -
en: EXAMPLES
zh_HANS-CN: 实例

note: type: Plain text
en: Adds content from all `*.txt` files under `Documentation` directory and its subdirectories:
zh_HANS-CN: 添加 `Documentation` 目录及其子目录下所有 `*.txt` 文件的内容：

note: type: Plain text
en: Note that the asterisk `*` is quoted from the shell in this example; this lets the command include the files from subdirectories of `Documentation/` directory.
zh_HANS-CN: 注意，在本例中，星号 `*` 是从 shell 中引入的；这使命令可以包含 `Documentation/` 中子目录的文件。

note: type: Plain text
en: Considers adding content from all git-*.sh scripts:
zh_HANS-CN: 从所有 git-*.sh 脚本中添加内容：

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 consider `subdir/git-foo.sh`.
zh_HANS-CN: 因为这个示例允许 shell 扩展星号（即显式列出文件），所以它不包含 `subdir/git-foo.sh`。

note: type: Title -
en: INTERACTIVE MODE
zh_HANS-CN: 交互模式

note: type: Plain text
en: When the command enters the interactive mode, it shows the output of the 'status' subcommand, and then goes into its interactive command loop.
zh_HANS-CN: 当命令进入交互模式时，它将显示 `status` 子命令的输出，然后进入其交互命令循环。

note: type: Plain text
en: The command loop shows the list of subcommands available, and gives a prompt "What now> ".  In general, when the prompt ends with a single '>', you can pick only one of the choices given and type return, like this:
zh_HANS-CN: 命令循环显示可用的子命令列表，并提示 `What now>`。通常，当提示以单个 `>` 结尾时，您只能选择给定的一个选项并键入回车，如下所示：

note: type: Plain text
en: You also could say `s` or `sta` or `status` above as long as the choice is unique.
zh_HANS-CN: 你也可以输入 `s`、`sta` 或 `status`，只要候选项是唯一的。

note: type: Plain text
en: The main command loop has 6 subcommands (plus help and quit).
zh_HANS-CN: 主命令循环有6个子命令（包括帮助和退出）。

note: type: Labeled list
en: status
zh_HANS-CN: 状态

note: type: Plain text
en: This shows the change between HEAD and index (i.e. what will be committed if you say `git commit`), and between index and working tree files (i.e. what you could stage further before `git commit` using `git add`) for each path.  A sample output looks like this:
zh_HANS-CN: 这将显示每个路径下 HEAD 和索引之间的更改（即，如果输入 `git commit`，将提交什么），以及索引和工作树文件之间的更改（即，在输入 `git commit` 之前，执行 `git add` 可以进一步暂存什么）。示例输出如下：

note: type: Plain text
en: It shows that foo.png has differences from HEAD (but that is binary so line count cannot be shown) and there is no difference between indexed copy and the working tree version (if the working tree version were also different, 'binary' would have been shown in place of 'nothing').  The other file, git-add{litdd}interactive.perl, has 403 lines added and 35 lines deleted if you commit what is in the index, but working tree file has further modifications (one addition and one deletion).
zh_HANS-CN: 它表明foo.png与HEAD有区别（但其是二进制的，因此无法显示行数），索引副本和工作树版本之间没有区别（如果工作树版本也不同，`nothing`的位置上会显示`binary`）。另一个文件git add-{litdd}interactive.perl添加了403行，如果提交索引中的内容，则删除了35行，但工作树文件有额外修改（一次添加一次删除）。

note: type: Plain text
en: This shows the status information and issues an "Update>>" prompt.  When the prompt ends with double '>>', you can make more than one selection, concatenated with whitespace or comma.  Also you can say ranges.  E.g. "2-5 7,9" to choose 2,3,4,5,7,9 from the list.  If the second number in a range is omitted, all remaining patches are taken.  E.g. "7-" to choose 7,8,9 from the list.  You can say '*' to choose everything.
zh_HANS-CN: 这将显示状态信息并发出“更新>>”提示。当提示以“>>”结尾时，可以进行多个选择，并用空格或逗号连接。你也可以输入范围。例如：“2-5 7,9”将从列表中选择2、3、4、5、7、9。如果省略一个范围中的第二个数字，则将获取所有剩余的补丁。例如：“7-”从列表中选择7、8、9。你可以输入“*”来选择全部补丁。

note: type: Plain text
en: What you chose are then highlighted with '*', like this:
zh_HANS-CN: 您选择的内容会用“*”突出显示，如下所示：

note: type: Plain text
en: To remove selection, prefix the input with `-` like this:
zh_HANS-CN: 要删除选定内容，请在输入前加上`-`，如下所示：

note: type: Plain text
en: After making the selection, answer with an empty line to stage the contents of working tree files for selected paths in the index.
zh_HANS-CN: 进行选择后，输入空行，以便为索引中选定的路径暂存工作树文件的内容。

note: type: Labeled list
en: revert
zh_HANS-CN: 还原

note: type: Plain text
en: This has a very similar UI to 'update', and the staged information for selected paths are reverted to that of the HEAD version.  Reverting new paths makes them untracked.
zh_HANS-CN: 它有一个与 'update' 非常相似的交互过程，所选路径的暂存信息将还原为 HEAD 版本。还原新路径将使它们不被追踪。

note: type: Labeled list
en: add untracked
zh_HANS-CN: 添加未跟踪文件

note: type: Plain text
en: This has a very similar UI to 'update' and 'revert', and lets you add untracked paths to the index.
zh_HANS-CN: 它有一个与 'update' 和 'revert' 非常相似的交互过程，允许您向索引添加未跟踪的路径。

note: type: Labeled list
en: patch
zh_HANS-CN: 补丁

note: type: Plain text
en: This lets you choose one path out of a 'status' like selection.  After choosing the path, it presents the diff between the index and the working tree file and asks you if you want to stage the change of each hunk.  You can select one of the following options and type return:
zh_HANS-CN: 这允许您从类似 "status" 命令的选择中选择一条路径。在选择路径之后，它将显示索引和工作树文件之间的差异，并询问您是否要暂存每个块的更改。您可以选择以下选项之一并输入回车：

note: type: Plain text
en: y - stage this hunk
    n - do not stage this hunk
    q - quit; do not stage this hunk or any of the remaining ones
    a - stage this hunk and all later hunks in the file
    d - do not stage this hunk or any of the later hunks in the file
    g - select a hunk to go to
    / - search for a hunk matching the given regex
    j - leave this hunk undecided, see next undecided hunk
    J - leave this hunk undecided, see next hunk
    k - leave this hunk undecided, see previous undecided hunk
    K - leave this hunk undecided, see previous hunk
    s - split the current hunk into smaller hunks
    e - manually edit the current hunk
    ? - print help
zh_HANS-CN: y - 暂存此区块
    n - 不暂存此区块
    q - 退出；不暂存包括此块在内的剩余的区块
    a - 暂存此块与此文件后面所有的区块
    d - 不暂存此块与此文件后面所有的 区块
    g - 选择并跳转至一个区块
    / - 搜索与给定正则表达示匹配的区块
    j - 暂不决定，转至下一个未决定的区块
    J - 暂不决定，转至下一个区块
    k - 暂不决定，转至上一个未决定的区块
    K - 暂不决定，转至上一个区块
    s - 将当前的区块分割成多个较小的区块
    e - 手动编辑当前的区块
    ? - 输出帮助

note: type: Plain text
en: After deciding the fate for all hunks, if there is any hunk that was chosen, the index is updated with the selected hunks.
zh_HANS-CN: 在决定了所有块的操作后，如果有选择的区块，则会使用其来更新索引。

note: type: Plain text
en: You can omit having to type return here, by setting the configuration variable `interactive.singleKey` to `true`.
zh_HANS-CN: 通过将配置变量 `interactive.singleKey` 设置为 `true`，在此处可以不必键入回车。

note: type: Plain text
en: This lets you review what will be committed (i.e. between HEAD and index).
zh_HANS-CN: 这使您可以查看要提交的内容（即，在HEAD和索引之间）。

note: type: Title -
en: EDITING PATCHES
zh_HANS-CN: 编辑补丁

note: type: Plain text
en: Invoking `git add -e` or selecting `e` from the interactive hunk selector will open a patch in your editor; after the editor exits, the result is applied to the index. You are free to make arbitrary changes to the patch, but note that some changes may have confusing results, or even result in a patch that cannot be applied.  If you want to abort the operation entirely (i.e., stage nothing new in the index), simply delete all lines of the patch. The list below describes some common things you may see in a patch, and which editing operations make sense on them.
zh_HANS-CN: 调用`git add -e`或从交互式块选择器中选择`e`命令，将在编辑器中打开一个补丁。编辑器退出后，结果将应用于索引。您可以随意对补丁进行任何更改，但是请注意，某些更改可能会导致混乱，甚至导致补丁无法使用。如果您想完全中止该操作（即不在索引中更新内容），只需删除补丁中的所有行。下面的列表描述了您可能会在补丁中看到的一些常见内容，以及对其进行哪些编辑操作才有意义。

note: type: Labeled list
en: added content
zh_HANS-CN: 添加的内容

note: type: Plain text
en: Added content is represented by lines beginning with "{plus}". You can prevent staging any addition lines by deleting them.
zh_HANS-CN: 添加的内容以“ {plus}”开头的行表示。您可以删除它们以防止暂存。

note: type: Labeled list
en: removed content
zh_HANS-CN: 删除的内容

note: type: Plain text
en: Removed content is represented by lines beginning with "-". You can prevent staging their removal by converting the "-" to a " " (space).
zh_HANS-CN: 删除的内容以“-”开头的行表示。您可以通过将“-”转换为“ ”（空格）来防止将其删除。

note: type: Labeled list
en: modified content
zh_HANS-CN: 修改的内容

note: type: Plain text
en: Modified content is represented by "-" lines (removing the old content)  followed by "{plus}" lines (adding the replacement content). You can prevent staging the modification by converting "-" lines to " ", and removing "{plus}" lines. Beware that modifying only half of the pair is likely to introduce confusing changes to the index.
zh_HANS-CN: 修改后的内容由“-”行（删除旧内容）和“{plus}”行（添加替换内容）表示。通过将“-”行转换为“ ”，并删除“{plus}”行，可以防止临时进行修改。请注意，只修改其中一个可能会给索引带来混乱的更改。

note: type: Plain text
en: There are also more complex operations that can be performed. But beware that because the patch is applied only to the index and not the working tree, the working tree will appear to "undo" the change in the index.  For example, introducing a new line into the index that is in neither the HEAD nor the working tree will stage the new line for commit, but the line will appear to be reverted in the working tree.
zh_HANS-CN: 还可以执行更复杂的操作。但是请注意，由于补丁仅应用于索引而不是工作树，因此工作树似乎会“撤消”索引中的更改。例如，在索引中添加一行，而该行不在 HEAD 或工作树。此时会暂存其以进行提交，但是该行似乎在会在工作树中进行还原。

note: type: Plain text
en: Avoid using these constructs, or do so with extreme caution.
zh_HANS-CN: 避免使用这些构造，除非格外小心。

note: type: Labeled list
en: removing untouched content
zh_HANS-CN: 删除未改动的内容

note: type: Plain text
en: Content which does not differ between the index and working tree may be shown on context lines, beginning with a " " (space).  You can stage context lines for removal by converting the space to a "-". The resulting working tree file will appear to re-add the content.
zh_HANS-CN: 索引和工作树之间没有区别的内容可能会显示在上下文行中，以“ ”（空格）开头。您可以通过将空格转换为“-”来暂存要删除的上下文行。生成的工作树文件将重新添加内容。

note: type: Labeled list
en: modifying existing content
zh_HANS-CN: 修改现有的内容

note: type: Plain text
en: One can also modify context lines by staging them for removal (by converting " " to "-") and adding a "{plus}" line with the new content.  Similarly, one can modify "{plus}" lines for existing additions or modifications. In all cases, the new modification will appear reverted in the working tree.
zh_HANS-CN: 也可以通过暂存上下文行（通过将“ ”转换为“-”）以进行删除来修改上下文行，并在其中添加新内容的“{plus}”行。类似地，可以修改“{plus}”行以进行现有内容的添加或修改。在所有情况下，新的修改都将在工作树中还原。

note: type: Labeled list
en: new content
zh_HANS-CN: 新的内容

note: type: Plain text
en: You may also add new content that does not exist in the patch; simply add new lines, each starting with "{plus}". The addition will appear reverted in the working tree.
zh_HANS-CN: 您还可以添加补丁中不存在的新内容。只需添加新行，每行以“{plus}”开头。添加的内容将还原到工作树中。

note: type: Plain text
en: There are also several operations which should be avoided entirely, as they will make the patch impossible to apply:
zh_HANS-CN: 还有一些操作应完全避免，因为它们会使补丁无法应用：

note: type: Plain text
en: adding context (" ") or removal ("-") lines
zh_HANS-CN: 添加上下文（“ ”）行或添加删除（“-”）行

note: type: Plain text
en: deleting context or removal lines
zh_HANS-CN: 删除上下文行或删除标记为删除的行

note: type: Plain text
en: modifying the contents of context or removal lines
zh_HANS-CN: 修改上下文或删除行的内容

note: type: Title -
en: SEE ALSO
zh_HANS-CN: 参见

note: type: Plain text
en: Part of the linkgit:git[1] suite
zh_HANS-CN: linkgit:git[1] 组件的一部分

note: type: Plain text
en: git-clone - Clone a repository into a new directory
zh_HANS-CN: git-clone - 将存储库克隆到新目录

note: type: Plain text
en: Clones a repository into a newly created directory, creates remote-tracking branches for each branch in the cloned repository (visible using `git branch --remotes`), and creates and checks out an initial branch that is forked from the cloned repository's currently active branch.
zh_HANS-CN: 将存储库克隆到新创建的目录中，为克隆存储库中的每个分支创建远程跟踪分支（使用`git branch --remotes`可见），并创建、签出从克隆存储库当前活动的分支派生的初始分支。

note: type: Plain text
en: After the clone, a plain `git fetch` without arguments will update all the remote-tracking branches, and a `git pull` without arguments will in addition merge the remote master branch into the current master branch, if any (this is untrue when "--single-branch" is given; see below).
zh_HANS-CN: 克隆后，执行不带参数的`git fetch`命令将更新所有远程跟踪的分支，执行不带参数的`git pull`命令将另把远程master分支合并到当前master分支（如果存在）（如果附加“--single-branch”参数，则情况不同；请参阅下文）。

note: type: Plain text
en: This default configuration is achieved by creating references to the remote branch heads under `refs/remotes/origin` and by initializing `remote.origin.url` and `remote.origin.fetch` configuration variables.
zh_HANS-CN: 通过在 `refs / remotes / origin` 下创建对远程分支头的引用，并通过初始化 `remote.origin.url` 和 `remote.origin.fetch` 配置变量来创建此默认配置。

note: type: Plain text
en: When the repository to clone from is on a local machine, this flag bypasses the normal "Git aware" transport mechanism and clones the repository by making a copy of HEAD and everything under objects and refs directories.  The files under `.git/objects/` directory are hardlinked to save space when possible.
zh_HANS-CN: 当要从中进行克隆的存储库位于本地计算机上时，此标志会绕过常规的“Git感知”传输机制，并通过为 HEAD 以及对象和引用目录内的所有内容创建副本以克隆存储库。尽可能将 `.git / objects /` 目录下的文件进行硬链接以节省空间。

note: type: Plain text
en: If the repository is specified as a local path (e.g., `/path/to/repo`), this is the default, and --local is essentially a no-op.  If the repository is specified as a URL, then this flag is ignored (and we never use the local optimizations).  Specifying `--no-local` will override the default when `/path/to/repo` is given, using the regular Git transport instead.
zh_HANS-CN: 如果将存储库指定为本地路径（例如，`/path/to/repo`），--local 参数实质上是不起作用的。如果将存储库指定为 URL，则忽略此标志（不使用本地优化）。指定 `--no-local` 将在给定 `/path/to/repo` 时覆盖默认值，而使用常规 Git 传输方式。

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: *NOTE*: this is a possibly dangerous operation; do *not* use
    it unless you understand what it does. If you clone your
    repository using this option and then delete branches (or use any
    other Git command that makes any existing commit unreferenced) in the
    source repository, some objects may become unreferenced (or dangling).
    These objects may be removed by normal Git operations (such as `git commit`)
    which automatically call `git maintenance run --auto`. (See
    linkgit:git-maintenance[1].) If these objects are removed and were referenced
    by the cloned repository, then the cloned repository will become corrupt.
zh_HANS-CN: *注意*：这可能是危险的操作；*不要*使用除非您了解它的功能。
    如果您克隆您的存储库时使用此选项，
    然后在源存储库中删除分支
    （或使用任何其他使现有提交解除引用的 Git 命令），
    某些对象可能会变得未引用（或悬空）。
    这些对象可能被常规的 Git 操作（例如 `git commit`）删除。
    它会自动调用 `git maintenance run --auto`。（请参阅linkgit:git-maintenance[1]。）
    如果这些对象已删除并被克隆的存储库引用，
    那么克隆的存储库将损坏。

note: type: Plain text
en: Note that running `git repack` without the `--local` option in a repository cloned with `--shared` will copy objects from the source repository into a pack in the cloned repository, removing the disk space savings of `clone --shared`.  It is safe, however, to run `git gc`, which uses the `--local` option by default.
zh_HANS-CN: 请注意，在使用 `--shared` 选项克隆的存储库中运行不带 `--local` 选项的 `git repack` 命令会将源存储库中的对象复制到克隆存储库中的包中，从而消除使用 `clone --shared` 节省的磁盘空间。不过，运行 `git-gc` 是安全的，它默认使用 `--local` 选项。

note: type: Plain text
en: If you want to break the dependency of a repository cloned with `--shared` on its source repository, you can simply run `git repack -a` to copy all objects from the source repository into a pack in the cloned repository.
zh_HANS-CN: 如果要断开用 `--shared` 克隆的存储库对其源存储库的依赖关系，只需运行 `git repack -a` 即可将源存储库中的所有对象复制到克隆存储库中的一个包中。

note: type: Labeled list
en: --reference[-if-able] <repository>
zh_HANS-CN: --reference[-if-able] <存储库>

note: type: Plain text
en: If the reference repository is on the local machine, automatically setup `.git/objects/info/alternates` to obtain objects from the reference repository.  Using an already existing repository as an alternate will require fewer objects to be copied from the repository being cloned, reducing network and local storage costs.  When using the `--reference-if-able`, a non existing directory is skipped with a warning instead of aborting the clone.
zh_HANS-CN: 如果参考存储库位于本地计算机上，则自动设置 `.git / objects / info / alternates` 以从参考存储库获取对象。使用现有的存储库作为备用存储库，则将需要从要克隆的存储库中复制较少的对象，从而降低了网络和本地存储成本。当使用 `--reference-if-able` 时，不存在的目录会被警告跳过，而不是中止克隆。

note: type: Plain text
en: *NOTE*: see the NOTE for the `--shared` option, and also the
    `--dissociate` option.
zh_HANS-CN: *注意*：请参阅`--shared`选项的注释，以及
    `--dissociate`选项。

note: type: Plain text
en: Borrow the objects from reference repositories specified with the `--reference` options only to reduce network transfer, and stop borrowing from them after a clone is made by making necessary local copies of borrowed objects.  This option can also be used when cloning locally from a repository that already borrows objects from another repository--the new repository will borrow objects from the same repository, and this option can be used to stop the borrowing.
zh_HANS-CN: 从用 `--reference` 选项指定的参考存储库中借用对象仅是为了减少网络传输，并在克隆后通过制作借用对象的必要本地副本来停止从对象借用。当从已经从另一个存储库借用对象的存储库进行本地克隆时，也可以使用此选项：新存储库将从同一个存储库借用对象，并且该选项可用于停止借用。

note: type: Plain text
en: Operate quietly.  Progress is not reported to the standard error stream.
zh_HANS-CN: 静默操作。进度不会报告给标准错误流。

note: type: Plain text
en: Run verbosely. Does not affect the reporting of progress status to the standard error stream.
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 forces progress status even if the standard error stream is not directed to a terminal.
zh_HANS-CN: 默认情况下，附加到终端时，会将进度状态报告给标准错误流，除非指定了 `--quiet` 选项。即使标准错误流未定向到终端，该标志也会强制显示进度状态。

note: type: Plain text
en: No checkout of HEAD is performed after the clone is complete.
zh_HANS-CN: 克隆完成后，不执行HEAD检出操作。

note: type: Plain text
en: Make a 'bare' Git repository.  That is, instead of creating `<directory>` and placing the administrative files in `<directory>/.git`, make the `<directory>` itself the `$GIT_DIR`. This obviously implies the `--no-checkout` because there is nowhere to check out the working tree.  Also the branch heads at the remote are copied directly to corresponding local branch heads, without mapping them to `refs/remotes/origin/`.  When this option is used, neither remote-tracking branches nor the related configuration variables are created.
zh_HANS-CN: 创建一个“纯”Git存储库。也就是说，不要创建 `<directory>` 并将管理文件放在 `<directory>/.git`，而是将 `<directory>` 本身设为`$GIT_DIR`。这显然暗含着 `--no-checkout` 选项，因为没有地方可以检出工作树。此外，远程的分支头直接复制到相应的本地分支头，而不将它们映射到 `refs/remotes/origin/`。使用此选项时，不会创建远程跟踪分支或相关配置变量。

note: type: Plain text
en: Initialize the sparse-checkout file so the working directory starts with only the files in the root of the repository. The sparse-checkout file can be modified to grow the working directory as needed.
zh_HANS-CN: 初始化稀疏检出文件，以便工作目录仅从存储库根目录中的文件开始。可以修改稀疏签出文件以根据需要扩展工作目录。

note: type: Labeled list
en: --filter=<filter-spec>
zh_HANS-CN: --filter=<过滤器定义>

note: type: Plain text
en: Use the partial clone feature and request that the server sends a subset of reachable objects according to a given object filter.  When using `--filter`, the supplied `<filter-spec>` is used for the partial clone filter. For example, `--filter=blob:none` will filter out all blobs (file contents) until needed by Git. Also, `--filter=blob:limit=<size>` will filter out all blobs of size at least `<size>`. For more details on filter specifications, see the `--filter` option in linkgit:git-rev-list[1].
zh_HANS-CN: 使用部分克隆功能，要求服务器根据给定的对象过滤器发送一个可到达的对象的子集。当使用 `--filter` 选项时，提供的 `<filter-spec>` 将被用于部分克隆过滤器。例如，`--filter=blob:none` 将过滤掉所有的数据对象（文件内容），直到 Git 需要相应的数据。另外，`--filter=blob:limit=<size>` 将过滤掉所有文件大小至少为 `<size>` 的数据对象。关于过滤器定义的更多细节，请参阅 linkgit:git-rev-list[1] 中的 `--filter` 选项。

note: type: Labeled list
en: -o <name>
zh_HANS-CN: -o <名称>

note: type: Labeled list
en: --origin <name>
zh_HANS-CN: --origin <名称>

note: type: Plain text
en: Instead of using the remote name `origin` to keep track of the upstream repository, use `<name>`.
zh_HANS-CN: 不使用远程名称 `origin` 来跟踪上游存储库，而使用`<名称>`。

note: type: Labeled list
en: -b <name>
zh_HANS-CN: -b <名称>

note: type: Labeled list
en: --branch <name>
zh_HANS-CN: --branch <名称>

note: type: Plain text
en: Instead of pointing the newly created HEAD to the branch pointed to by the cloned repository's HEAD, point to `<name>` branch instead. In a non-bare repository, this is the branch that will be checked out.  `--branch` can also take tags and detaches the HEAD at that commit in the resulting repository.
zh_HANS-CN: 不将新创建的 HEAD 指向克隆存储库的 HEAD 所指向的分支，而是指向`<名称>`分支。在非裸仓库中，这是将被检出的分支。 `--branch` 也可以使用标签并在生成的存储库中的提交时分离 HEAD。

note: type: Labeled list
en: -u <upload-pack>
zh_HANS-CN: -u <上传包>

note: type: Plain text
en: When given, and the repository to clone from is accessed via ssh, this specifies a non-default path for the command run on the other end.
zh_HANS-CN: 如果指定了要克隆的存储库，且可以通过 ssh 访问该存储库，这将为另一端运行的命令指定非默认路径。

note: type: Labeled list
en: --template=<template_directory>
zh_HANS-CN: --template = <模板目录>

note: type: Plain text
en: Specify the directory from which templates will be used; (See the "TEMPLATE DIRECTORY" section of linkgit:git-init[1].)
zh_HANS-CN: 指定将使用模板的目录；（请参阅 linkgit:git-init[1] 的“模板目录”部分。）

note: type: Labeled list
en: -c <key>=<value>
zh_HANS-CN: -c <键> = <值>

note: type: Labeled list
en: --config <key>=<value>
zh_HANS-CN: --config <键> = <值>

note: type: Plain text
en: Due to limitations of the current implementation, some configuration variables do not take effect until after the initial fetch and checkout.  Configuration variables known to not take effect are: `remote.<name>.mirror` and `remote.<name>.tagOpt`.  Use the corresponding `--mirror` and `--no-tags` options instead.
zh_HANS-CN: 由于当前实现方式的限制，某些配置变量要等到初始获取和签出后才能生效。已知不会生效的配置变量有：`remote.<s名称> .mirror` 和`remote.<名称> .tagOpt`。如要修改，应改用相应的 `--mirror` 和 `--no-tags` 选项。

note: type: Labeled list
en: --depth <depth>
zh_HANS-CN: --depth <深度>

note: type: Plain text
en: Create a 'shallow' clone with a history truncated to the specified number of commits. Implies `--single-branch` unless `--no-single-branch` is given to fetch the histories near the tips of all branches. If you want to clone submodules shallowly, also pass `--shallow-submodules`.
zh_HANS-CN: 创建一个历史记录被截断为指定提交次数的“浅”克隆。暗含 `--single-branch` 选项，除非给出 `--no-single-branch` 来获取所有分支顶端附近的历史记录。如果要浅层克隆子模块，还可以使用 `--shallow-submodules` 选项。

note: type: Plain text
en: Create a shallow clone with a history after the specified time.
zh_HANS-CN: 创建浅克隆，只包含指定的时间之后的历史记录。

note: type: Plain text
en: Create a shallow clone with a history, excluding commits reachable from a specified remote branch or tag.  This option can be specified multiple times.
zh_HANS-CN: 创建一个有历史的浅克隆，不包含可以被指定远程分支或标签访问的提交。本选项可以使用多次。

note: type: Plain text
en: Clone only the history leading to the tip of a single branch, either specified by the `--branch` option or the primary branch remote's `HEAD` points at.  Further fetches into the resulting repository will only update the remote-tracking branch for the branch this option was used for the initial cloning.  If the HEAD at the remote did not point at any branch when `--single-branch` clone was made, no remote-tracking branch is created.
zh_HANS-CN: 仅克隆直到单一分支末尾的历史，该分支被 `--branch` 选项或主分支远程 `HEAD` 指定。被创建仓库之后的抓取将只更新在克隆时被指定的远程跟踪分支。如果在 `--single-branch` 克隆时，远程 HEAD 未指向任何分支，则不会创建远程跟踪分支。

note: type: Plain text
en: Don't clone any tags, and set `remote.<remote>.tagOpt=--no-tags` in the config, ensuring that future `git pull` and `git fetch` operations won't follow any tags. Subsequent explicit tag fetches will still work, (see linkgit:git-fetch[1]).
zh_HANS-CN: 不克隆任何标签，并在配置中设置 `remote.<remote>.tagOpt=--no-tags` ，确保将来的`git pull`和`git fetch`操作不会跟随任何标签。随后的显式标签抓取仍将起作用（参阅 linkgit：git-fetch [1]）。

note: type: Plain text
en: Can be used in conjunction with `--single-branch` to clone and maintain a branch with no references other than a single cloned branch. This is useful e.g. to maintain minimal clones of the default branch of some repository for search indexing.
zh_HANS-CN: 可以与 `--single-branch` 结合使用，以克隆和维护除单个克隆分支外没有其他引用的分支。这在例如维护某些仓库的默认分支的最小克隆以进行搜索索引时有用。

note: type: Plain text
en: After the clone is created, initialize and clone submodules within based on the provided pathspec.  If no pathspec is provided, all submodules are initialized and cloned.  This option can be given multiple times for pathspecs consisting of multiple entries.  The resulting clone has `submodule.active` set to the provided pathspec, or "." (meaning all submodules) if no pathspec is provided.
zh_HANS-CN: 创建克隆后，根据提供的路径规范初始化并克隆其中的子模块。如果未提供路径规范，则将初始化并克隆所有子模块。对于由多个条目组成的路径规范，可以多次赋予此选项。生成的克隆将把 `submodule.active` 设为提供的路径规范。如果未提供路径规范，生成的克隆将把 `submodule.active` 设为 "." （表示所有子模块）。

note: type: Plain text
en: Submodules are initialized and cloned using their default settings. This is equivalent to running `git submodule update --init --recursive <pathspec>` immediately after the clone is finished. This option is ignored if the cloned repository does not have a worktree/checkout (i.e. if any of `--no-checkout`/`-n`, `--bare`, or `--mirror` is given)
zh_HANS-CN: 子模块使用其默认设置进行初始化和克隆。这等效于克隆完成后立即运行 `git submodule update --init --recursive <路径规范>`。如果克隆的仓库没有工作区/检出（即给出了 `--no-checkout`/`-n`，`--bare` 或 `--mirror`中的任何一个选项），则忽略此选项。

note: type: Plain text
en: All submodules which are cloned will be shallow with a depth of 1.
zh_HANS-CN: 所有克隆的子模块都将是浅克隆，深度为1。

note: type: Plain text
en: All submodules which are cloned will use the status of the submodule's remote-tracking branch to update the submodule, rather than the superproject's recorded SHA-1. Equivalent to passing `--remote` to `git submodule update`.
zh_HANS-CN: 克隆的所有子模块将使用子模块的远程跟踪分支的状态来更新子模块，而不是超级项目的已记录SHA-1。等同于将`--remote` 传递给 `git submodule update`。

note: type: Labeled list
en: --separate-git-dir=<git dir>
zh_HANS-CN: --separate-git-dir=<git目录>

note: type: Plain text
en: Instead of placing the cloned repository where it is supposed to be, place the cloned repository at the specified directory, then make a filesystem-agnostic Git symbolic link to there.  The result is Git repository can be separated from working tree.
zh_HANS-CN: 不将克隆的存储库放置在原处，而是将克隆的存储库放置在指定的目录中，然后在此处建立与文件系统无关的Git符号链接。这可以将Git仓库与工作区分离。

note: type: Plain text
en: The number of submodules fetched at the same time.  Defaults to the `submodule.fetchJobs` option.
zh_HANS-CN: 同时抓取的子模块数。默认为 `submodule.fetchJobs` 选项。

note: type: Labeled list
en: <repository>
zh_HANS-CN: <仓库>

note: type: Plain text
en: The (possibly remote) repository to clone from.  See the <<URLS,GIT URLS>> section below for more information on specifying repositories.
zh_HANS-CN: 要克隆的（可能是远程的）仓库。有关指定仓库的更多信息，参阅下面的 <<URLS,GIT URLS>> 部分。

note: type: Labeled list
en: <directory>
zh_HANS-CN: <目录>

note: type: Plain text
en: The name of a new directory to clone into.  The "humanish" part of the source repository is used if no directory is explicitly given (`repo` for `/path/to/repo.git` and `foo` for `host.xz:foo/.git`).  Cloning into an existing directory is only allowed if the directory is empty.
zh_HANS-CN: 要克隆到的新目录的名称。如果未明确指定目录，则使用源仓库中的“人性化”部分（对于 `/path/to/repo.git` 而言，为 `repo`；对于 `host.xz:foo/.git` 而言，为 `foo`）。仅当目录为空时才允许克隆到现有目录。

note: type: Plain text
en: Clone from upstream:
zh_HANS-CN: 从上游克隆：

note: type: Plain text
en: Make a local clone that borrows from the current directory, without checking things out:
zh_HANS-CN: 制作一个从当前目录借用的本地克隆，而无需进行检出：

note: type: Plain text
en: Clone from upstream while borrowing from an existing local directory:
zh_HANS-CN: 从上游克隆时借用本地目录：

note: type: Plain text
en: Create a bare repository to publish your changes to the public:
zh_HANS-CN: 创建一个裸仓库，以将您的更改发布给公众：

note: type: Plain text
en: git-init - Create an empty Git repository or reinitialize an existing one
zh_HANS-CN: git-init - 创建一个空的Git仓库或重新初始化已有仓库

note: type: Plain text
en: This command creates an empty Git repository - basically a `.git` directory with subdirectories for `objects`, `refs/heads`, `refs/tags`, and template files.  An initial `HEAD` file that references the HEAD of the master branch is also created.
zh_HANS-CN: 该命令创建一个空的Git存储库 - 本质上是一个 `.git` 目录，其中包含 `objects`、`refs/heads`、`refs/tags`和模板文件的子目录。还将创建一个引用master分支 HEAD 的初始 `HEAD` 文件。

note: type: Plain text
en: If the object storage directory is specified via the `$GIT_OBJECT_DIRECTORY` environment variable then the sha1 directories are created underneath - otherwise the default `$GIT_DIR/objects` directory is used.
zh_HANS-CN: 如果通过 `$GIT_OBJECT_DIRECTORY` 环境变量指定了对象存储目录，那么将在该目录下创建 sha1 目录，否则将使用默认的 `$GIT_DIR/objects` 目录。

note: type: Plain text
en: Only print error and warning messages; all other output will be suppressed.
zh_HANS-CN: 仅打印错误和警告消息；所有其他输出将不会显示。

note: type: Plain text
en: Create a bare repository. If `GIT_DIR` environment is not set, it is set to the current working directory.
zh_HANS-CN: 创建一个纯仓库。如果未设置 `GIT_DIR` 环境变量，则将其设置为当前工作目录。

note: type: Plain text
en: Specify the given object format (hash algorithm) for the repository.  The valid values are 'sha1' and (if enabled) 'sha256'.  'sha1' is the default.
zh_HANS-CN: 指定存储库的对象格式（哈希算法）。有效值为 'sha1' 和（如果启用）'sha256'。'sha1' 是默认值。

note: type: Plain text
en: Specify the directory from which templates will be used.  (See the "TEMPLATE DIRECTORY" section below.)
zh_HANS-CN: 指定要使用模板的目录。（请参见下面的“模板目录”部分。）

note: type: Plain text
en: Instead of initializing the repository as a directory to either `$GIT_DIR` or `./.git/`, create a text file there containing the path to the actual repository.  This file acts as filesystem-agnostic Git symbolic link to the repository.
zh_HANS-CN: 并不将存储库初始化至 `$GIT_DIR` 或 `./.git/` 目录，而是在其中创建一个包含实际存储库路径的文本文件。此文件作为连接到仓库的 Git 符号链接，其与文件系统无关。

note: type: Plain text
en: If this is reinitialization, the repository will be moved to the specified path.
zh_HANS-CN: 如果为重新初始化操作，则将存储库移动到指定的路径。

note: type: Plain text
en: Use the specified name for the initial branch in the newly created repository.  If not specified, fall back to the default name: `master`.
zh_HANS-CN: 在新创建的仓库中为初始分支指定名称。如果没有指定，则使用默认名称：`master`。

note: type: Plain text
en: Specify that the Git repository is to be shared amongst several users.  This allows users belonging to the same group to push into that repository.  When specified, the config variable "core.sharedRepository" is set so that files and directories under `$GIT_DIR` are created with the requested permissions.  When not specified, Git will use permissions reported by umask(2).
zh_HANS-CN: 指定 Git 存储库在多个用户之间共享。这允许属于同一组的用户推送到该存储库。指定时，将设置配置变量 "core.sharedRepository"，以便使用请求的权限创建 `$GIT_DIR` 下的文件和目录。未指定时，Git 将使用 umask(2) 返回的权限。

note: type: Plain text
en: The option can have the following values, defaulting to 'group' if no value is given:
zh_HANS-CN: 此选项可以有以下值，如果未给定值，则默认为 'group'：

note: type: Labeled list
en: 'umask' (or 'false')
zh_HANS-CN: 'umask'（或 'false'）

note: type: Plain text
en: Use permissions reported by umask(2). The default, when `--shared` is not specified.
zh_HANS-CN: 使用 umask(2) 返回的权限。未指定 `--shared` 时，此为默认值。

note: type: Labeled list
en: 'group' (or 'true')
zh_HANS-CN: 'group'（或 'true'）

note: type: Plain text
en: Make the repository group-writable, (and g+sx, since the git group may be not the primary group of all users). This is used to loosen the permissions of an otherwise safe umask(2) value. Note that the umask still applies to the other permission bits (e.g. if umask is '0022', using 'group' will not remove read privileges from other (non-group) users). See '0xxx' for how to exactly specify the repository permissions.
zh_HANS-CN: 使存储库组可写（并且 g+sx，因为 git 组可能不是所有用户的主要组）。这用于放宽原本安全的 umask(2) 值的权限。请注意，umask 仍然适用于其他权限位（例如，如果 umask 为 '0022'，则使用 'group' 不会删除其他（非组）用户的读取特权）。有关如何精确指定存储库权限的信息，请参见 '0xxx'。

note: type: Labeled list
en: 'all' (or 'world' or 'everybody')
zh_HANS-CN: 'all' （或 'world' 或 'everybody'）

note: type: Plain text
en: Same as 'group', but make the repository readable by all users.
zh_HANS-CN: 与使用 'group' 选项相同，但使存储库对所有用户可读。

note: type: Plain text
en: '0xxx' is an octal number and each file will have mode '0xxx'. '0xxx' will override users' umask(2) value (and not only loosen permissions as 'group' and 'all' does). '0640' will create a repository which is group-readable, but not group-writable or accessible to others. '0660' will create a repo that is readable and writable to the current user and group, but inaccessible to others.
zh_HANS-CN: '0xxx' 是一个八进制数，每个文件的模式均为 '0xxx'。' 0xxx' 将覆盖用户的 umask(2) 值（不仅像 'group 和 'all' 那样放宽权限）。'0640' 将创建一个组可读取但不能组写入且其他用户无法访问的存储库。'0660' 将创建当前用户和组可读可写但其他用户无法访问的存储库。

note: type: Plain text
en: By default, the configuration flag `receive.denyNonFastForwards` is enabled in shared repositories, so that you cannot force a non fast-forwarding push into it.
zh_HANS-CN: 默认情况下，共享存储库中启用了配置标志 `receive.denyNonFastForwards`，因此您不能强制将非快速前进提交推送到其中。

note: type: Plain text
en: If you provide a 'directory', the command is run inside it. If this directory does not exist, it will be created.
zh_HANS-CN: 如果提供 'dicrectory'，则命令在其中运行。如果此目录不存在，则创建它。

note: type: Title -
en: TEMPLATE DIRECTORY
zh_HANS-CN: 模板目录

note: type: Plain text
en: Files and directories in the template directory whose name do not start with a dot will be copied to the `$GIT_DIR` after it is created.
zh_HANS-CN: 模板目录中名称不以点开头的文件和目录将在创建后复制到 `$GIT_DIR` 中。

note: type: Plain text
en: The template directory will be one of the following (in order):
zh_HANS-CN: 模板目录将是以下之一（按顺序）：

note: type: Plain text
en: the argument given with the `--template` option;
zh_HANS-CN: 用 `--template` 选项给出的参数；

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: the `init.templateDir` configuration variable; or
zh_HANS-CN: `init.templateDir` 配置变量；或者

note: type: Plain text
en: the default template directory: `/usr/share/git-core/templates`.
zh_HANS-CN: 默认模板目录：`/usr/share/git-core/templates`。

note: type: Plain text
en: The default template directory includes some directory structure, suggested "exclude patterns" (see linkgit:gitignore[5]), and sample hook files.
zh_HANS-CN: 默认的模板目录包括一些目录结构，建议的“排除模式”（请参阅 linkgit:gitignore[5]）和示例钩子文件。

note: type: Plain text
en: The sample hooks are all disabled by default. To enable one of the sample hooks rename it by removing its `.sample` suffix.
zh_HANS-CN: 默认情况下，样例钩子都被禁用。要启用一个示例挂钩，请通过删除其后缀 `.sample` 对其重命名。

note: type: Plain text
en: See linkgit:githooks[5] for more general info on hook execution.
zh_HANS-CN: 有关钩子执行的更多信息，请参见 linkgit:githooks[5]。

note: type: Labeled list
en: Start a new Git repository for an existing code base
zh_HANS-CN: 为现有代码库启动新的 Git 仓库

note: type: Plain text
en: Create a /path/to/my/codebase/.git directory.
zh_HANS-CN: 创建 /path/to/my/codebase/.git 目录。

note: type: Plain text
en: Add all existing files to the index.
zh_HANS-CN: 将所有现有文件添加到索引。

note: type: Plain text
en: Record the pristine state as the first commit in the history.
zh_HANS-CN: 将原始状态记录为历史记录中的第一次提交。

note: type: Labeled list
en: <file>
zh_HANS-CN: <>

note: type: Plain text
en: 'short':
zh_HANS-CN: 'short'：

note: type: Plain text
en: 'medium':
zh_HANS-CN: 'medium'：

note: type: Plain text
en: git-svn - Bidirectional operation between a Subversion repository and Git
zh_HANS-CN: git-svn - Subversion 仓库和 Git 之间的双向操作

note: type: Plain text
en: 'git svn' is a simple conduit for changesets between Subversion and Git.  It provides a bidirectional flow of changes between a Subversion and a Git repository.
zh_HANS-CN: 'git svn' 是一个 Subversion 和 Git 之间变更集的简单通道。  它用于 Subversion 和 Git 仓库之间变更的双向流动。

note: type: Plain text
en: 'git svn' can track a standard Subversion repository, following the common "trunk/branches/tags" layout, with the --stdlayout option.  It can also follow branches and tags in any layout with the -T/-t/-b options (see options to 'init' below, and also the 'clone' command).
zh_HANS-CN: 'git svn' 可以跟踪标准 Subversion 仓库，遵循常见的“主干/分支/标记”布局，使用 --stdlayout 选项。 它还可以使用 -T/-t/-b 选项在任何布局中跟踪分支和标记（请参阅下面的 'init' 选项以及 'clone' 命令）。

note: type: Plain text
en: Once tracking a Subversion repository (with any of the above methods), the Git repository can be updated from Subversion by the 'fetch' command and Subversion updated from Git by the 'dcommit' command.
zh_HANS-CN: 跟踪 Subversion 仓库（使用上述任何方法）后，可以通过 'fetch' 命令从 Subversion 更新 Git 仓库，并通过 'dcommit' 命令从 Git 更新 Subversion 仓库。

note: type: Plain text
en: Initializes an empty Git repository with additional metadata directories for 'git svn'.  The Subversion URL may be specified as a command-line argument, or as full URL arguments to -T/-t/-b.  Optionally, the target directory to operate on can be specified as a second argument.  Normally this command initializes the current directory.
zh_HANS-CN: 为 'git svn' 初始化一个空的 Git 仓库，并添加元数据目录。  Subversion 的 URL 可以作为命令行参数，也可以作为 -T/-t/-b 的完整 URL 参数。  或者，可以指定要操作的目标目录作为第二参数。  通常情况下这个命令会在当前目录进行初始化。

note: type: Plain text
en: These are optional command-line options for init.  Each of these flags can point to a relative repository path (--tags=project/tags) or a full url (--tags=https://foo.org/project/tags).  You can specify more than one --tags and/or --branches options, in case your Subversion repository places tags or branches under multiple paths.  The option --stdlayout is a shorthand way of setting trunk,tags,branches as the relative paths, which is the Subversion default. If any of the other options are given as well, they take precedence.
zh_HANS-CN: 这些是用于 init 的可选命令行选项。  每个标志都可以指向相对的版本库路径 (-tags=project/tags) 或完整的 url (-tags=https://foo.org/project/tags)。  你可以指定多个 --tags 和/或 --branches 选项，以防你的 Subversion 仓库将标记或分支放在多个路径下。  选项 --stdlayout 是将 主干、标记、分支设置为相对路径的一种快捷方式，这是 Subversion 的默认设置。如果使用了其他的选项，它们将被优先考虑。

note: type: Plain text
en: Set the 'noMetadata' option in the [svn-remote] config.  This option is not recommended, please read the 'svn.noMetadata' section of this manpage before using this option.
zh_HANS-CN: 设置 [svn-remote] 配置的 'noMetadata' 选项。  不建议使用该选项，请在使用该选项前阅读本手册中 'svn.noMetadata' 部分。

note: type: Plain text
en: Set the 'useSvmProps' option in the [svn-remote] config.
zh_HANS-CN: 设置[svn-remote] 配置的 'useSvmProps' 选项。

note: type: Plain text
en: Set the 'useSvnsyncProps' option in the [svn-remote] config.
zh_HANS-CN: 设置 [svn-remote] 配置的 'useSvnsyncProps' 选项。

note: type: Plain text
en: Set the 'rewriteRoot' option in the [svn-remote] config.
zh_HANS-CN: 设置 [svn-remote] 配置的 'rewriteRoot' 选项。

note: type: Plain text
en: Set the 'rewriteUUID' option in the [svn-remote] config.
zh_HANS-CN: 设置 [svn-remote] 配置的 'rewriteUUID' 选项。

note: type: Plain text
en: For transports that SVN handles authentication for (http, https, and plain svn), specify the username.  For other transports (e.g. `svn+ssh://`), you must include the username in the URL, e.g. `svn+ssh://foo@svn.bar.com/project`
zh_HANS-CN: 对于由 SVN 处理认证的传输类型（http、https和纯svn），请指定用户名。  对于其他的传输类型(例如`svn+ssh:///`)，你必须在URL中包含用户名，例如：`svn+ssh://foo@svn.bar.com/project`

note: type: Plain text
en: In general, URLs contain information about the transport protocol, the address of the remote server, and the path to the repository.  Depending on the transport protocol, some of this information may be absent.
zh_HANS-CN: 通常，URL 包含有关传输协议，远程服务器的地址以及存储库路径的信息。对于某些传输协议，一些信息可能会缺失。

note: type: Plain text
en: Git supports ssh, git, http, and https protocols (in addition, ftp, and ftps can be used for fetching, but this is inefficient and deprecated; do not use it).
zh_HANS-CN: Git 支持 ssh，git，http 和 https 协议（此外，可以使用 ftp 和 ftps 进行抓取，但这效率低下且不建议使用；请勿使用）。

note: type: Plain text
en: The native transport (i.e. git:// URL) does no authentication and should be used with caution on unsecured networks.
zh_HANS-CN: 本地传输（即 git:// URL）不进行身份验证，在不安全的网络上应谨慎使用。

note: type: Plain text
en: The following syntaxes may be used with them:
zh_HANS-CN: 以下是上述几个传输协议的格式：

note: type: Plain text
en: An alternative scp-like syntax may also be used with the ssh protocol:
zh_HANS-CN: ssh 协议也可以使用类似 scp 的语法：

note: type: Plain text
en: This syntax is only recognized if there are no slashes before the first colon. This helps differentiate a local path that contains a colon. For example the local path `foo:bar` could be specified as an absolute path or `./foo:bar` to avoid being misinterpreted as an ssh url.
zh_HANS-CN: 仅当第一个冒号之前没有斜杠时才能识别此语法。这有助于区分包含冒号的本地路径。例如，可以将本地路径 `foo:bar` 指定为绝对路径，或者将 `./foo:bar` 指定为绝对路径，以避免被误识别为 ssh url。

note: type: Plain text
en: The ssh and git protocols additionally support ~username expansion:
zh_HANS-CN: ssh 和 git 协议还支持 ~username 扩展：

note: type: Plain text
en: For local repositories, also supported by Git natively, the following syntaxes may be used:
zh_HANS-CN: 对于本地存储库（Git 本身也支持），可以使用以下语法：

note: type: Plain text
en: These two syntaxes are mostly equivalent, except when cloning, when the former implies --local option. See linkgit:git-clone[1] for details.
zh_HANS-CN: 这两种语法几乎是等效的，除了在克隆时，前者暗含 --local 选项。有关详细信息，请参阅 linkgit:git-clone[1]。

note: type: Plain text
en: These two syntaxes are mostly equivalent, except the former implies --local option.
zh_HANS-CN: 这两种语法几乎是等效的，除了前者暗含 --local 选项。

note: type: Plain text
en: 'git clone', 'git fetch' and 'git pull', but not 'git push', will also accept a suitable bundle file. See linkgit:git-bundle[1].
zh_HANS-CN: 'git clone'，'git fetch' 和 'git pull'，但不包括 'git push'，也将接受合适的捆绑文件。参见 linkgit:git-bundle[1]。

note: type: Plain text
en: When Git doesn't know how to handle a certain transport protocol, it attempts to use the 'remote-<transport>' remote helper, if one exists. To explicitly request a remote helper, the following syntax may be used:
zh_HANS-CN: 当 Git 不知道如何处理某种传输协议时，它会尝试使用 'remote- <传输方式>' 远程帮助程序（如果存在）。要显式请求远程帮助程序，可以使用以下语法：

note: type: Plain text
en: <transport>::<address>
zh_HANS-CN: <传输方式>::<地址>

note: type: Plain text
en: where <address> may be a path, a server and path, or an arbitrary URL-like string recognized by the specific remote helper being invoked. See linkgit:gitremote-helpers[7] for details.
zh_HANS-CN: 其中，<地址> 可以是路径，服务器与路径，也可以是可被调用的特定远程帮助程序识别的类似于 URL 的任意字符串。有关详细信息，请参阅 linkgit:gitremote-helpers[7]。

note: type: Plain text
en: If there are a large number of similarly-named remote repositories and you want to use a different format for them (such that the URLs you use will be rewritten into URLs that work), you can create a configuration section of the form:
zh_HANS-CN: 如果存在大量类似名称的远程存储库，并且您要为其使用不同的格式（这样，您使用的 URL 将被重写为有效的 URL），则可以创建以下形式的配置：

note: type: Plain text
en: For example, with this:
zh_HANS-CN: 例如，有如下：

note: type: Plain text
en: a URL like "work:repo.git" or like "host.xz:/path/to/repo.git" will be rewritten in any context that takes a URL to be "git://git.host.xz/repo.git".
zh_HANS-CN: URL 诸如 "work:repo.git" 或 "host.xz:/path/to/repo.git" 会在任何 URL 类似于 "git://git.host.xz/repo" 的上下文中重写。

note: type: Plain text
en: If you want to rewrite URLs for push only, you can create a configuration section of the form:
zh_HANS-CN: 如果要重写仅用于推送的 URL，可以创建表单的配置部分：

note: type: Plain text
en: a URL like "git://example.org/path/to/repo.git" will be rewritten to "ssh://example.org/path/to/repo.git" for pushes, but pulls will still use the original URL.
zh_HANS-CN: 类似于 "git://example.org/path/to/repo.git" 的 URL 会被重写为 "ssh://example.org/path/to/repo.git"，用于推送。但拉取代码时仍然使用原始的 URL。

note: type: Plain text
en: use "git bisect run" to find the commit that introduced it
zh_HANS-CN: 使用 "git bisect run" 查找引入它的提交
