From fb8ebb8a6eb3a4899f407df71358009fadceae27 Mon Sep 17 00:00:00 2001 From: YoshidaRyoko Date: Sat, 20 Jul 2024 13:13:03 +0800 Subject: [PATCH] git-reset: Fix low-quality translations Signed-off-by: YoshidaRyoko --- po/documentation.zh_HANS-CN.po | 262 ++++++++++++++++++--------------- 1 file changed, 144 insertions(+), 118 deletions(-) diff --git a/po/documentation.zh_HANS-CN.po b/po/documentation.zh_HANS-CN.po index ad9e11c..3bb971e 100644 --- a/po/documentation.zh_HANS-CN.po +++ b/po/documentation.zh_HANS-CN.po @@ -50512,7 +50512,7 @@ msgstr "" #: en/git-reset.txt:22 #, placeholders:'HEAD':'HEAD', priority:280 msgid "In the first three forms, copy entries from `` to the index. In the last form, set the current branch head (`HEAD`) to ``, optionally modifying index and working tree to match. The ``/`` defaults to `HEAD` in all forms." -msgstr "在前三种形式中,从``复制条目到索引。 在最后一个表格中,将当前的分支头(`HEAD`)设置为``,可以选择修改索引和工作树来匹配。 ``/``在所有表格中默认为`HEAD`。" +msgstr "在前三种形式中,从 `` 复制条目到索引。 在最后一种形式中,将当前的分支头( `HEAD` )设置为 `` ,可选地修改索引和工作树以匹配。在所有形式中, `` / `` 默认为 `HEAD` 。" #. type: Labeled list #: en/git-reset.txt:23 @@ -50530,19 +50530,19 @@ msgstr "'git reset' [-q] [--pathspec-from-file=<文件> [--pathspec-file-nul]] [ #: en/git-reset.txt:28 #, priority:280 msgid "These forms reset the index entries for all paths that match the `` to their state at ``. (It does not affect the working tree or the current branch.)" -msgstr "这些表格将所有符合 `<路径规范>` 的路径的索引项重置为 `<目录树对象>` 时的状态。 (它不影响工作目录树或当前分支。)" +msgstr "这些形式将所有匹配 `<路径规范>` 的路径的索引条目重置为 `<目录树对象>` 时的状态。 (它不会影响工作目录树或当前分支。)" #. type: Plain text #: en/git-reset.txt:32 #, ignore-ellipsis, placeholders:'[--source=':'--staged', priority:280 msgid "This means that `git reset ` is the opposite of `git add `. This command is equivalent to `git restore [--source=] --staged ...`." -msgstr "这意味着,`git reset `与`git add `相反。该命令等同于`git restore [--source=] --staged ...`。" +msgstr "这意味着, `git reset ` 与 `git add ` 相反。该命令等同于 `git restore [--source=] --staged ...` 。" #. type: Plain text #: en/git-reset.txt:39 #, placeholders:'linkgit:git-restore[1]':'linkgit:git-restore[1]':'`--source`', priority:280 msgid "After running `git reset ` 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." -msgstr "运行 `git reset ` 来更新索引条目后,您可以使用 linkgit:git-restore[1] 来检查索引中的内容到工作树上。另外,使用 linkgit:git-restore[1] 并用 `--source` 指定一个提交,你可以一次性将一个路径的内容从提交中复制到索引和工作树上。" +msgstr "运行 `git reset ` 更新索引条目后,您可以使用 linkgit:git-restore[1] 将索引中的内容检出到工作树中。或者,使用 linkgit:git-restore[1] 并使用 `--source` 指定一个提交,您可以一次性将提交中某个路径的内容复制到索引和工作树中。" #. type: Labeled list #: en/git-reset.txt:40 @@ -50554,13 +50554,13 @@ msgstr "'git reset' (--patch | -p) [<目录树对象>] [--] [<路径规范>...]" #: en/git-reset.txt:44 #, placeholders:'HEAD', priority:280 msgid "Interactively select hunks in the difference between the index and `` (defaults to `HEAD`). The chosen hunks are applied in reverse to the index." -msgstr "在索引和``(默认为`HEAD`)之间的差异中交互式地选择猎物。 选择的猎物将被反向应用到索引中。" +msgstr "交互式选择索引和 `<目录树对象>` (默认为 `HEAD` )之间差异的代码块。选择的代码块将逆序应用于索引。" #. type: Plain text #: en/git-reset.txt:48 #, placeholders:'linkgit:git-add[1]':'`--patch`', priority:280 msgid "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." -msgstr "这意味着 `git reset -p` 与 `git add -p` 相反,也就是说,你可以用它来有选择地重置 hunks。参见 linkgit:git-add[1] 的 ``互动模式''部分,了解如何操作`--patch`模式。" +msgstr "这意味着 `git reset -p` 与 `git add -p` 相反,即您可以用它来有选择地重置代码块。参见 linkgit:git-add[1] 的 \"交互模式\"部分,了解如何操作 `--patch` 模式。" #. type: Labeled list #: en/git-reset.txt:49 @@ -50572,7 +50572,7 @@ msgstr "'git reset' [<模式>] [<提交>]" #: en/git-reset.txt:55 #, placeholders:'ORIG_HEAD':'`--mixed`', priority:280 msgid "This form resets the current branch head to `` and possibly updates the index (resetting it to the tree of ``) and the working tree depending on ``. Before the operation, `ORIG_HEAD` is set to the tip of the current branch. If `` is omitted, defaults to `--mixed`. The `` must be one of the following:" -msgstr "此表单会将当前分支的头重置为 `<提交>`,并可能根据 `<模式>`更新索引(重置为 `<提交>`的目录树)和工作目录树。在操作之前,`ORIG_HEAD` 会被设置为当前分支的顶端。如果省略了 `<模式>`,则默认为 `--mixed`。`<模式>` 必须是以下之一:" +msgstr "这种形式将当前分支头重置为 `<提交>` ,并可能根据 `<模式>` 更新索引(将其重置为 `<提交>` 的树)和工作目录树。在操作之前, `ORIG_HEAD` 会被设置为当前分支的顶端。如果省略 `<模式>` ,则默认为 `--mixed` 。 `<模式>` 必须是以下之一:" #. type: Labeled list #: en/git-reset.txt:57 @@ -50584,7 +50584,7 @@ msgstr "--soft" #: en/git-reset.txt:62 #, priority:280 msgid "Does not touch the index file or the working tree at all (but resets the head to ``, just like all modes do). This leaves all your changed files \"Changes to be committed\", as `git status` would put it." -msgstr "完全不碰索引文件或工作树(但将头部重置为``,就像所有模式一样)。这使你的所有更改的文件都是 \"待提交的更改\",正如`git status`所说的。" +msgstr "完全不触及索引文件或工作树(但将头重置为 `<提交>` ,就像所有模式都做的那样)。这使所有已更改的文件保持 \"Changes to be committed\" 状态,就像 `git status` 会显示的那样。" #. type: Labeled list #: en/git-reset.txt:63 @@ -50596,13 +50596,13 @@ msgstr "--mixed" #: en/git-reset.txt:67 #, priority:280 msgid "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." -msgstr "重置索引,但不重置工作树(即保留已修改的文件,但不标记为提交)并报告未更新的内容。这是默认动作。" +msgstr "重置索引,但不重置工作树(即保留已修改的文件,但不标记为提交)并报告哪些内容未更新。这是默认动作。" #. type: Plain text #: en/git-reset.txt:70 #, placeholders:'`-N`':'linkgit:git-add[1]', priority:280 msgid "If `-N` is specified, removed paths are marked as intent-to-add (see linkgit:git-add[1])." -msgstr "如果指定了 `-N`,则删除的路径将被标记为要添加(请参阅 linkgit:git-add[1])。" +msgstr "如果指定了 `-N` ,则删除的路径将被标记为要添加(请参阅 linkgit:git-add[1])。" #. type: Labeled list #: en/git-reset.txt:71 @@ -50620,25 +50620,25 @@ msgstr "重置索引和工作树。工作树中自 `<提交>` 以来对跟踪文 #: en/git-reset.txt:83 #, placeholders:'HEAD', priority:280 msgid "Resets the index and updates the files in the working tree that are different between `` 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 `` and the index has unstaged changes, reset is aborted." -msgstr "重置索引并更新工作树中在``和`HEAD`之间不同的文件,但保留那些在索引和工作树之间不同的文件(即那些有未被添加的修改)。 如果一个在``和索引之间不同的文件有未分阶段的变化,重置将被中止。" +msgstr "重置索引并更新工作树中与 `<提交>` 和 `HEAD` 之间不同的文件,但保留那些在索引和工作树之间不同的文件(即尚未被添加的修改)。如果 `<提交>` 和索引之间不同的文件有未暂存的更改,重置操作将被中止。" #. type: Plain text #: en/git-reset.txt:86 #, placeholders:'`--merge`':'git read-tree', priority:280 msgid "In other words, `--merge` does something like a `git read-tree -u -m `, but carries forward unmerged index entries." -msgstr "换句话说,`--merge`做的是类似于`git read-tree -u -m `的事情,但会转发未合并的索引条目。" +msgstr "换句话说, `--merge` 做的事情类似于 `git read-tree -u -m <提交>` ,但会保留尚未合并的索引条目。" #. type: Plain text #: en/git-reset.txt:92 #, placeholders:'HEAD':'HEAD', priority:280 msgid "Resets index entries and updates files in the working tree that are different between `` and `HEAD`. If a file that is different between `` and `HEAD` has local changes, reset is aborted." -msgstr "重置索引项并更新工作树中``和`HEAD`之间不同的文件。 如果一个在``和`HEAD`之间不同的文件有本地修改,重置将被中止。" +msgstr "重置索引条目并更新工作树中与 `<提交>` 和 `HEAD` 之间不同的文件。 如果 `<提交>` 和 `HEAD` 之间不同的文件有本地修改,重置操作将被中止。" #. type: Plain text #: en/git-reset.txt:98 #, placeholders:'--recurse-submodules':'HEAD', priority:280 msgid "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." -msgstr "当工作树被更新时,使用 --recurse-submodules 也将根据超级项目中记录的提交,递归地重置所有活动的子模块的工作树,同时也将子模块的 HEAD 设置为在该提交中被分离。" +msgstr "当更新工作树时,使用 --recurse-submodules 还将递归性地根据超级项目中记录的提交来重置所有活动子模块的工作树,同时将子模块的 HEAD 设置为分离在该提交处。" #. type: Plain text #: en/git-reset.txt:102 en/git-restore.txt:30 en/git-revert.txt:33 @@ -50690,25 +50690,25 @@ msgstr "" #: en/git-reset.txt:153 #, priority:280 msgid "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." -msgstr "你正在愉快地工作,发现这些文件中的修改都很有秩序。 你不希望在运行`git diff'时看到它们,因为你打算在其他文件上工作,而这些文件的变化会让你分心。" +msgstr "你正在愉快地工作,发现这些文件中的修改都很有秩序。 你不希望在运行 `git diff` 时看到它们,因为你打算在其他文件上工作,而这些文件的变化会让你分心。" #. type: Plain text #: en/git-reset.txt:154 #, priority:280 msgid "Somebody asks you to pull, and the changes sound worthy of merging." -msgstr "有人要求你拉,而且这些变化听起来值得合并。" +msgstr "有人要求你 pull,而且这些变化听起来值得合并。" #. type: Plain text #: en/git-reset.txt:159 #, placeholders:'HEAD', priority:280 msgid "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." -msgstr "然而,你已经破坏了索引(也就是说,你的索引与`HEAD`提交不匹配)。 但你知道你要做的拉动并不影响`frotz.c`或`filfre.c`,所以你恢复了这两个文件的索引修改。 你在工作树上的修改仍然存在。" +msgstr "然而,你已经破坏了索引(也就是说,你的索引与 `HEAD` 提交不匹配)。但你知道你要做的 pull 并不影响 `frotz.c` 或 `filfre.c` ,所以你恢复了这两个文件的索引修改。 你在工作树上的修改仍然存在。" #. type: Plain text #: en/git-reset.txt:161 #, priority:280 msgid "Then you can pull and merge, leaving `frotz.c` and `filfre.c` changes still in the working tree." -msgstr "然后你可以拉出并合并,留下`frotz.c`和`filfre.c`的修改仍在工作树上。" +msgstr "然后你可以拉出并合并,留下 `frotz.c` 和 `filfre.c` 的修改仍在工作树上。" #. type: Labeled list #: en/git-reset.txt:162 @@ -50734,7 +50734,7 @@ msgstr "" #: en/git-reset.txt:174 #, priority:280 msgid "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\"." -msgstr "这通常是在你记得你刚提交的内容不完整,或者你的提交信息拼错了,或者两者都是。 留下工作树在 \"重置 \"之前的样子。" +msgstr "这通常是在你记得你刚提交的内容不完整,或者你的提交信息拼错了,或者两者都有。保留了\"重置\"之前工作树的状态。" #. type: Plain text #: en/git-reset.txt:175 @@ -50746,13 +50746,13 @@ msgstr "对工作树文件进行修正。" #: en/git-reset.txt:178 #, placeholders:'.git/ORIG_HEAD':'`-C`', priority:280 msgid "\"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." -msgstr "\"reset \"将旧的头部复制到`.git/ORIG_HEAD`;从其日志信息开始重做提交。 如果你不需要进一步编辑信息,你可以给`-C`选项代替。" +msgstr "\"reset \"将旧的头部复制到 `.git/ORIG_HEAD` ;从其日志信息开始重做提交。 如果你不需要进一步编辑信息,你可以传入 `-C` 选项代替。" #. type: Plain text #: en/git-reset.txt:180 #, placeholders:'`--amend`':'linkgit:git-commit[1]', priority:280 msgid "See also the `--amend` option to linkgit:git-commit[1]." -msgstr "参见linkgit:git-commit[1]的`--amend`选项。" +msgstr "参见linkgit:git-commit[1]的 `--amend` 选项。" #. type: Labeled list #: en/git-reset.txt:181 @@ -50776,7 +50776,7 @@ msgstr "" #: en/git-reset.txt:193 #, placeholders:'HEAD', priority:280 msgid "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`." -msgstr "你已经做了一些提交,但意识到它们在 \"master \"分支中还不成熟。 你想在一个主题分支中继续完善它们,所以在当前的`HEAD'之外创建了`topic/wip'分支。" +msgstr "你已经做了一些提交,但意识到它们在 \"master \" 分支中还不成熟。 你想在一个主题分支中继续完善它们,所以在当前的 `HEAD` 之外创建了 `topic/wip` 分支。" #. type: Plain text #: en/git-reset.txt:194 @@ -50788,7 +50788,7 @@ msgstr "回溯主分支,去掉这三个提交。" #: en/git-reset.txt:195 #, priority:280 msgid "Switch to `topic/wip` branch and keep working." -msgstr "切换到`topic/wip`分支并继续工作。" +msgstr "切换到 `topic/wip` 分支并继续工作。" #. type: Labeled list #: en/git-reset.txt:196 @@ -50810,7 +50810,7 @@ msgstr "" #: en/git-reset.txt:208 #, placeholders:'HEAD':'HEAD':'HEAD':'linkgit:git-rebase[1]', priority:280 msgid "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.)" -msgstr "最后三个提交(`HEAD`,`HEAD^`,和`HEAD~2`)是坏的,你不希望再看到它们。 如果你已经把这些提交给了别人,请 *不要* 这样做。 参见 linkgit:git-rebase[1] 中的 “从上游仓库重建中恢复” 一节,了解这样做的意义。)" +msgstr "最后三个提交(`HEAD`,`HEAD^`,和 `HEAD~2` )是坏的,你不希望再看到它们。 如果你已经把这些提交给了别人,请 *不要* 这样做。 参见 linkgit:git-rebase[1] 中的 “从上游仓库重建中恢复” 一节,了解这样做的意义。)" #. type: Labeled list #: en/git-reset.txt:209 @@ -50832,15 +50832,15 @@ msgid "" "Fast-forward\n" "$ git reset --hard ORIG_HEAD <4>\n" msgstr "" -"$ git pull <1>\n" +"$ git pull <1>\n" "自动合并nitfol\n" -"CONFLICT(内容)。nitfol的合并冲突\n" +"CONFLICT(内容):nitfol的合并冲突\n" "自动合并失败;修复冲突,然后提交结果。\n" -"$ git reset --hard <2>\n" -"$ git pull . topic/branch <3>\n" +"$ git reset --hard <2>\n" +"$ git pull . topic/branch <3>\n" "从41223...更新到13134...\n" "快进\n" -"$ git reset --hard ORIG_HEAD <4>\n" +"$ git reset --hard ORIG_HEAD <4>\n" #. type: Plain text #: en/git-reset.txt:226 @@ -50852,7 +50852,7 @@ msgstr "试图从上游更新导致了很多冲突;你现在还没有准备好 #: en/git-reset.txt:229 #, placeholders:'--hard`':'--hard':'HEAD', priority:280 msgid "\"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." -msgstr "\"pull \"没有进行合并提交,所以`git reset --hard`是`git reset --hard HEAD`的同义词,它清除了索引文件和工作树上的混乱。" +msgstr "\"pull \" 没有进行合并提交,所以 `git reset --hard` 是 `git reset --hard HEAD` 的同义词,可以清除索引文件和工作树上的混乱。" #. type: Plain text #: en/git-reset.txt:231 @@ -50864,7 +50864,7 @@ msgstr "将一个主题分支合并到当前分支,这导致了快进。" #: en/git-reset.txt:236 #, placeholders:'ORIG_HEAD', priority:280 msgid "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." -msgstr "但你决定这个主题分支还不适合公开使用。 \"pull \"或 \"merge \"总是在`ORIG_HEAD`中留下当前分支的原始提示,所以硬重置到它会使你的索引文件和工作树回到那个状态,并将分支的提示重置到那个提交。" +msgstr "但你决定这个主题分支还不适合公开使用。\"pull \" 或 \"merge\" 总是将当前分支的原始尖端保留在 `ORIG_HEAD` ,所以硬重置到它会使你的索引文件和工作树回到那个状态,并将分支尖端重置到那个提交。" #. type: Labeled list #: en/git-reset.txt:237 @@ -50894,13 +50894,13 @@ msgstr "" #: en/git-reset.txt:252 #, priority:280 msgid "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." -msgstr "即使你的工作树中可能有局部的修改,当你知道另一个分支中的修改没有与之重叠时,你可以放心地说`git pull`。" +msgstr "即使你的工作树中可能有局部的修改,当你知道另一个分支中的修改没有与之重叠时,你可以放心地 `git pull` 。" #. type: Plain text #: en/git-reset.txt:257 #, placeholders:'--hard':'ORIG_HEAD':'--merge`', priority:280 msgid "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." -msgstr "在检查了合并的结果后,你可能会发现另一个分支的修改不尽人意。 运行`git reset --hard ORIG_HEAD`可以让你回到原来的位置,但它会丢弃你的本地修改,这是你不想要的。 `git reset --merge`会保留你的本地修改。" +msgstr "在检查了合并的结果后,你可能会发现另一个分支的修改不尽人意。 运行 `git reset --hard ORIG_HEAD` 可以让你回到原来的位置,但它会丢弃你的本地修改,这是你不想要的。 `git reset --merge` 会保留你的本地修改。" #. type: Labeled list #: en/git-reset.txt:259 en/git-stash.txt:309 @@ -50930,31 +50930,31 @@ msgid "" msgstr "" "$ git switch feature ;# 你在 \"feature \"分支工作,并且\n" "$ work work work;# 被打断了\n" -"$ git commit -a -m \"snapshot WIP\" <1\n" +"$ git commit -a -m \"snapshot WIP\" <1>\n" "$ git switch master\n" "$ fix fix fix\n" "$ git commit ;# 提交时有真实日志\n" "$ git switch feature\n" -"$ git reset --soft HEAD^ ;# 回到 WIP 状态 <2>\n" -"$ git reset <3>\n" +"$ git reset --soft HEAD^ ;# 回到 WIP 状态 <2>\n" +"$ git reset <3>\n" #. type: Plain text #: en/git-reset.txt:279 #, priority:280 msgid "This commit will get blown away so a throw-away log message is OK." -msgstr "这个提交会被吹走,所以扔掉的日志信息是可以的。" +msgstr "这个提交将会被丢弃,所以可以使用一个临时的提交信息。" #. type: Plain text #: en/git-reset.txt:281 #, priority:280 msgid "This removes the 'WIP' commit from the commit history, and sets your working tree to the state just before you made that snapshot." -msgstr "这将从提交历史中删除 \"WIP \"提交,并将你的工作树设置为刚刚做出快照之前的状态。" +msgstr "这将从提交历史中删除 \"WIP\" 提交,并将你的工作树设置为刚刚做出快照之前的状态。" #. type: Plain text #: en/git-reset.txt:284 #, priority:280 msgid "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." -msgstr "在这一点上,索引文件仍然有你提交的所有WIP修改,作为 \"快照WIP\"。 这样就可以更新索引,将你的WIP文件显示为未提交的。" +msgstr "此时,索引文件仍然包含您提交为 \"快照 WIP\" 的所有工作进度更改。这会更新索引来显示您的工作进度文件为未提交状态。" #. type: Plain text #: en/git-reset.txt:286 @@ -50972,7 +50972,7 @@ msgstr "重置索引中的单个文件" #: en/git-reset.txt:292 #, priority:280 msgid "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." -msgstr "假设你在索引中添加了一个文件,但后来决定不想把它加入你的提交中。你可以用git reset将该文件从索引中删除,同时保留你的修改。" +msgstr "假设你在索引中添加了一个文件,但后来决定不想把它加入你的提交中。你可以用 `git reset` 将该文件从索引中删除,同时保留你的修改。" #. type: delimited block - #: en/git-reset.txt:297 @@ -51014,7 +51014,7 @@ msgstr "在工作树中保留修改,同时丢弃一些以前的提交内容" #: en/git-reset.txt:311 #, priority:280 msgid "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." -msgstr "假设你正在做某件事,并提交了它,然后你又继续做了一会儿,但现在你认为你工作树中的内容应该在另一个分支中,而这个分支与你之前提交的内容毫无关系。你可以启动一个新的分支,并重置它,同时保留工作树中的变化。" +msgstr "假设你正在处理一些事情,并提交了它,然后你又继续做了一会儿,但现在你认为你在工作树中的内容应该位于另一个与您之前提交的内容无关的分支中。你可以启动一个新的分支并在保留工作树中更改的情况下重置它。" #. type: delimited block - #: en/git-reset.txt:320 @@ -51040,19 +51040,19 @@ msgstr "" #: en/git-reset.txt:323 #, priority:280 msgid "This commits your first edits in `branch1`." -msgstr "这将提交你在 `branch1`中的第一次编辑。" +msgstr "这将提交你在 `branch1` 中的第一次编辑。" #. type: Plain text #: en/git-reset.txt:327 #, priority:280 msgid "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." -msgstr "在理想的世界里,你可以在创建并切换到 \"分支2\"(即 \"git switch -c branch2 start\")时意识到先前的提交不属于新主题,但人无完人。" +msgstr "在理想的世界里,你可以在创建并切换到 \"branch2\"(即 \"git switch -c branch2 start\")时意识到先前的提交不属于新主题,但人无完人。" #. type: Plain text #: en/git-reset.txt:329 #, placeholders:'--keep`', priority:280 msgid "But you can use `reset --keep` to remove the unwanted commit after you switched to `branch2`." -msgstr "但你可以用`reset --keep`来删除你切换到`branch2`后不需要的提交。" +msgstr "但你可以用 `reset --keep` 来删除你切换到 `branch2` 后不需要的提交。" #. type: Labeled list #: en/git-reset.txt:330 @@ -51079,56 +51079,56 @@ msgid "" "$ git diff --cached <7>\n" "$ git commit ... <8>\n" msgstr "" -"$ git reset -N HEAD^ <1>\n" -"$ git add -p <2>\n" -"$ git diff --cached <3>\n" -"$ git commit -c HEAD@{1}. <4>\n" +"$ git reset -N HEAD^ <1>\n" +"$ git add -p <2>\n" +"$ git diff --cached <3>\n" +"$ git commit -c HEAD@{1} <4>\n" "... <5>\n" "$ git add ... <6>\n" -"$ git diff --cached <7>\n" +"$ git diff --cached <7>\n" "$ git commit ... <8>\n" #. type: Plain text #: en/git-reset.txt:354 #, placeholders:'HEAD', priority:280 msgid "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." -msgstr "首先,将历史记录向后重设一次提交,这样我们就删除了原始提交,但保留了工作树上的所有修改。N确保任何用`HEAD`添加的新文件仍然被标记,以便`git add -p`能够找到它们。" +msgstr "首先,将历史记录重置回前一个提交以删除原始提交,但保留了工作树上的所有修改。使用 -N 确保任何使用 `HEAD` 添加的新文件仍然被标记,以便 `git add -p` 能够找到它们。" #. type: Plain text #: en/git-reset.txt:358 #, priority:280 msgid "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." -msgstr "接下来,我们使用 \"git add -p \"工具,交互式地选择要添加的diff hunks。这将依次询问每个差异块,你可以使用简单的命令,如 \"是,包括这个\",\"不,不包括这个\",甚至是非常强大的 \"编辑 \"工具。" +msgstr "接下来,我们使用 `git add -p` 工具,交互式地选择要添加的差异块。这将逐个询问每个差异块,你可以使用简单的命令,如 \"是,包括这个\" , \"不,不包括这个\" ,甚至是非常强大的 \"编辑 \" 工具。" #. type: Plain text #: en/git-reset.txt:362 #, placeholders:'--cached`', priority:280 msgid "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." -msgstr "一旦对你想要包括的hunks感到满意,你应该通过使用`git diff --cached`来验证为第一次提交准备了什么。这将显示所有已经移入索引并即将提交的修改。" +msgstr "一旦对你想要包括的块感到满意,你应该使用 `git diff --cached` 来验证为第一次提交准备的内容。这将显示所有已经移入索引并即将提交的更改。" #. type: Plain text #: en/git-reset.txt:369 #, placeholders:'`-c`':'HEAD':'{1}':'HEAD':'linkgit:git-reflog[1]', priority:280 msgid "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." -msgstr "接下来,提交存储在索引中的修改。`-c`选项指定从你第一次提交时的原始信息中预先填入提交信息。这对避免重复输入很有帮助。`HEAD@{1}`是一个特殊的符号,表示`HEAD`在最初的重置提交(1次变更前)之前曾经处于的提交。 更多细节见 linkgit:git-reflog[1]。你也可以使用任何其他有效的提交参考。" +msgstr "接下来,提交存储在索引中的修改。`-c` 选项指定从你第一次提交时的原始信息中预先填入提交信息。这对避免重复输入很有帮助。 `HEAD@{1}` 是一个特殊的符号,表示 `HEAD` 在最初的重置提交(1次变更前)之前处于的提交。 更多细节见 linkgit:git-reflog[1]。你也可以使用任何其他有效的提交引用。" #. type: Plain text #: en/git-reset.txt:371 #, priority:280 msgid "You can repeat steps 2-4 multiple times to break the original code into any number of commits." -msgstr "你可以多次重复第2-4步,将原始代码分解成任意数量的提交。" +msgstr "你可以多次重复第 2-4 步,将原始代码分解成任意数量的提交。" #. type: Plain text #: en/git-reset.txt:374 #, priority:280 msgid "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." -msgstr "现在你已经把许多修改拆成了自己的提交,可能不再使用`git add`的补丁模式,以便选择所有剩余的未提交的修改。" +msgstr "现在你已经把许多更改拆成了自己的提交,可能不再使用 `git add` 的补丁模式,以便选择所有剩余的未提交的修改。" #. type: Plain text #: en/git-reset.txt:377 #, priority:280 msgid "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." -msgstr "再一次检查以确认你已经包含了你想要的东西。你可能还想确认git diff没有显示任何剩余的修改,以便以后提交。" +msgstr "再一次检查以确认你已经包含了你想要的东西。你可能还想确认 git diff 没有显示任何剩余的修改,以便以后提交。" #. type: Plain text #: en/git-reset.txt:378 @@ -51152,13 +51152,13 @@ msgstr "git reset --option 目标\n" #: en/git-reset.txt:391 #, placeholders:'HEAD', priority:280 msgid "to reset the `HEAD` to another commit (`target`) with the different reset options depending on the state of the files." -msgstr "来重置`HEAD`到另一个提交(`target`),根据文件的状态,有不同的重置选项。" +msgstr "来重置 `HEAD` 到另一个提交( `target` ),根据文件的状态,有不同的重置选项。" #. type: Plain text #: en/git-reset.txt:400 #, placeholders:'HEAD':'--soft':'HEAD', priority:280 msgid "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`)." -msgstr "在这些表中,`A`、`B`、`C`和`D`是一个文件的一些不同状态。例如,第一个表格的第一行意味着如果一个文件在工作树中处于`A`状态,在索引中处于`B`状态,在`HEAD`中处于`C`状态,在目标中处于`D`状态,那么`git reset --soft target`将使文件在工作树中处于`A`状态,在索引中处于`B`状态。 它重设(即移动)`HEAD`(即当前分支的顶端,如果你在一个分支上)到`target`(它的文件处于`D`状态)。" +msgstr "在这些表中, `A` 、 `B` 、`C` 和 `D` 是一个文件的一些不同状态。例如,第一个表格的第一行意味着如果一个文件在工作树中处于 `A` 状态,在索引中处于 `B` 状态,在 `HEAD` 中处于 `C` 状态,在目标中处于 `D` 状态,那么 `git reset --soft target` 将使文件在工作树中处于 `A` 状态,在索引中处于 `B` 状态。 它重设(即移动) `HEAD` (即当前分支的顶端,如果你在一个分支上)到 `target` (它的文件处于 `D` 状态)。" #. type: delimited block . #: en/git-reset.txt:409 @@ -51172,17 +51172,25 @@ msgid "" "\t\t\t --merge (disallowed)\n" "\t\t\t --keep (disallowed)\n" msgstr "" -"工作索引 HEAD 目标工作索引 HEAD\n" -"----------------------------------------------------\n" -" A B C D --soft(软的) A B D\n" -"\t\t\t --mixed(混合型) A D D\n" -"\t\t\t --hard(硬的) D D D\n" -"\t\t\t --merge(合并) (不允许)\n" -"\t\t\t --keep(保持) (不允许)\n" +"工作树 索引 HEAD 目标 工作树 索引 HEAD\n" +"------------------------------------------------------------\n" +" A B C D --soft A B D\n" +"\t\t\t --mixed A D D\n" +"\t\t\t --hard D D D\n" +"\t\t\t --merge (不允许)\n" +"\t\t\t --keep (不允许)\n" #. type: delimited block . #: en/git-reset.txt:419 -#, no-wrap, placeholders:'HEAD':'HEAD':'----------------------------------------------------':'--soft':'--mixed':'--hard':'--merge':'--keep', priority:280 +#, fuzzy, no-wrap, placeholders:'HEAD':'HEAD':'----------------------------------------------------':'--soft':'--mixed':'--hard':'--merge':'--keep', priority:280 +#| msgid "" +#| "working index HEAD target working index HEAD\n" +#| "----------------------------------------------------\n" +#| " B B C C --soft B B C\n" +#| "\t\t\t --mixed B C C\n" +#| "\t\t\t --hard C C C\n" +#| "\t\t\t --merge C C C\n" +#| "\t\t\t --keep B C C\n" msgid "" "working index HEAD target working index HEAD\n" "----------------------------------------------------\n" @@ -51192,13 +51200,13 @@ msgid "" "\t\t\t --merge (disallowed)\n" "\t\t\t --keep A C C\n" msgstr "" -"工作索引 HEAD 目标工作索引 HEAD\n" -"----------------------------------------------------\n" -" A B C C --soft(软的) A B C\n" -"\t\t\t --mixed(混合型) A C C\n" -"\t\t\t --hard(硬性) C C C\n" -"\t\t\t --merge(合并)(不允许)\n" -"\t\t\t --keep(保持) A C C\n" +"工作树 索引 HEAD 目标 工作树 索引 HEAD\n" +"------------------------------------------------------------\n" +" B B C C --soft B B C\n" +"\t\t\t --mixed B C C\n" +"\t\t\t --hard C C C\n" +"\t\t\t --merge C C C\n" +"\t\t\t --keep B C C\n" #. type: delimited block . #: en/git-reset.txt:429 @@ -51212,13 +51220,13 @@ msgid "" "\t\t\t --merge D D D\n" "\t\t\t --keep (disallowed)\n" msgstr "" -"工作索引 HEAD 目标工作索引 HEAD\n" -"----------------------------------------------------\n" -" B B C D --soft(软) B B D\n" -"\t\t\t --mixed(混合型) B D D\n" -"\t\t\t --hard(硬的) D D D\n" -"\t\t\t --merge(合并) D D D\n" -"\t\t\t --keep(保持)(不允许)\n" +"工作树 索引 HEAD 目标 工作树 索引 HEAD\n" +"------------------------------------------------------------\n" +" B B C D --soft B B D\n" +"\t\t\t --mixed B D D\n" +"\t\t\t --hard D D D\n" +"\t\t\t --merge D D D\n" +"\t\t\t --keep(不允许)\n" #. type: delimited block . #: en/git-reset.txt:439 @@ -51232,13 +51240,13 @@ msgid "" "\t\t\t --merge C C C\n" "\t\t\t --keep B C C\n" msgstr "" -"工作索引 HEAD 目标工作索引 HEAD\n" -"----------------------------------------------------\n" -" B B C C --soft(软) B B C\n" -"\t\t\t --mixed(混合型) B C C\n" -"\t\t\t --hard(硬性) C C C\n" -"\t\t\t --merge(合并) C C C\n" -"\t\t\t --keep(保持) B C C\n" +"工作树 索引 HEAD 目标 工作树 索引 HEAD\n" +"------------------------------------------------------------\n" +" B B C C --soft B B C\n" +"\t\t\t --mixed B C C\n" +"\t\t\t --hard C C C\n" +"\t\t\t --merge C C C\n" +"\t\t\t --keep B C C\n" #. type: delimited block . #: en/git-reset.txt:449 @@ -51252,13 +51260,13 @@ msgid "" "\t\t\t --merge (disallowed)\n" "\t\t\t --keep (disallowed)\n" msgstr "" -"工作索引 HEAD 目标工作索引 HEAD\n" -"----------------------------------------------------\n" -" B C C D --soft(软) B C D\n" -"\t\t\t --mixed(混合型) B D D\n" -"\t\t\t --hard(硬的) D D D\n" -"\t\t\t --merge(合并) (不允许)\n" -"\t\t\t --keep(保持) (不允许)\n" +"工作树 索引 HEAD 目标 工作树 索引 HEAD\n" +"------------------------------------------------------------\n" +" B C C D --soft B C D\n" +"\t\t\t --mixed B D D\n" +"\t\t\t --hard(硬的) D D D\n" +"\t\t\t --merge (不允许)\n" +"\t\t\t --keep (不允许)\n" #. type: delimited block . #: en/git-reset.txt:459 @@ -51272,27 +51280,27 @@ msgid "" "\t\t\t --merge B C C\n" "\t\t\t --keep B C C\n" msgstr "" -"工作索引 HEAD 目标工作索引 HEAD\n" -"----------------------------------------------------\n" -" B C C C --soft(软B) C C\n" -"\t\t\t --mixed(混合型) B C C\n" -"\t\t\t --hard(硬性) C C C\n" -"\t\t\t --merge(合并) B C C\n" -"\t\t\t --keep(保持) B C C\n" +"工作树 索引 HEAD 目标 工作树 索引 HEAD\n" +"------------------------------------------------------------\n" +" B C C C --soft B C C\n" +"\t\t\t --mixed B C C\n" +"\t\t\t --hard C C C\n" +"\t\t\t --merge B C C\n" +"\t\t\t --keep B C C\n" # ERROR: `--merge` not found in translation #. type: Plain text #: en/git-reset.txt:469 #, placeholders:'--merge`':'`--merge`', priority:280 msgid "`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." -msgstr "`reset --merge`是指在重设冲突的合并时使用。任何合并操作都会保证参与合并的工作树文件在开始之前没有相对于索引的局部变化,并且会将结果写入工作树。因此,如果我们看到索引和目标之间,以及索引和工作树之间有一些差异,那么这意味着我们没有从一个合并操作失败后留下的冲突状态中重新设置出来。这就是为什么我们在这种情况下不允许使用 `--merge` 选项。" +msgstr "`reset --merge` 旨在在从已冲突的合并中重置时使用。任何合并操作都保证在开始之前,参与合并的工作树文件相对于索引没有本地更改,并且会将结果写入工作树。所以如果我们看到索引和目标之间以及索引和工作树之间有一些差异,那就意味着我们不是在从一个合并操作因冲突失败后留下的状态中重置。这就是为什么我们在这种情况下不允许使用 `--merge` 选项。" # ERROR: --keep` not found in translation #. type: Plain text #: en/git-reset.txt:478 #, placeholders:'--keep`':'HEAD':'HEAD', priority:280 msgid "`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." -msgstr "`reset --keep` 意思是在删除当前分支中的一些最后的提交,同时保留工作树中的修改时使用。如果我们想删除的提交和我们想保留的工作树上的修改之间可能存在冲突,那么重置是不允许的。这就是为什么如果工作树和 `HEAD` 之间,以及 `HEAD` 和目标之间都有变化,那么就不允许重置。为了安全起见,当有未合并的条目时,也不允许这样做。" +msgstr "`reset --keep` 旨在移除当前分支中的一些最后的提交时保留工作树中的修改。如果想要移除的提交中的更改与想要保留的工作树中的更改之间存在冲突,则不允许重置。这就是为什么如果工作树和 `HEAD` 之间,以及 `HEAD` 和目标之间都有更改时不允许重置。为了安全起见,当有未合并的条目时,也不允许这样做。" #. type: Plain text #: en/git-reset.txt:481 @@ -51312,13 +51320,13 @@ msgid "" "\t\t\t --merge B B B\n" "\t\t\t --keep (disallowed)\n" msgstr "" -"工作索引 HEAD 目标工作索引 HEAD\n" -"----------------------------------------------------\n" -" X U A B --soft(软)(不允许)。\n" -"\t\t\t --mixed(混合型) X B B\n" -"\t\t\t --hard(硬的) B B B\n" -"\t\t\t --merge(合并) B B B\n" -"\t\t\t --keep(保持) (不允许)\n" +"工作树 索引 HEAD 目标 工作树 索引 HEAD\n" +"------------------------------------------------------------\n" +" X U A B --soft(不允许)\n" +"\t\t\t --mixed X B B\n" +"\t\t\t --hard B B B\n" +"\t\t\t --merge B B B\n" +"\t\t\t --keep (不允许)\n" #. type: delimited block . #: en/git-reset.txt:500 @@ -51332,19 +51340,19 @@ msgid "" "\t\t\t --merge A A A\n" "\t\t\t --keep (disallowed)\n" msgstr "" -"工作索引 HEAD 目标工作索引 HEAD\n" -"----------------------------------------------------\n" -" X U A A --soft(软) (不允许)\n" -"\t\t\t --mixed(混合型) X A A\n" -"\t\t\t --hard(硬性) A A A\n" -"\t\t\t --merge(合并) A A A\n" -"\t\t\t --keep(保持) (不允许)\n" +"工作树 索引 HEAD 目标 工作树 索引 HEAD\n" +"------------------------------------------------------------\n" +" X U A A --soft (不允许)\n" +"\t\t\t --mixed X A A\n" +"\t\t\t --hard A A A\n" +"\t\t\t --merge A A A\n" +"\t\t\t --keep (不允许)\n" #. type: Plain text #: en/git-reset.txt:503 #, priority:280 msgid "`X` means any state and `U` means an unmerged index." -msgstr "`X`指任何状态,`U`指未合并的索引。" +msgstr "`X` 指任何状态, `U` 指未合并的索引。" #. type: Title = #: en/git-restore.txt:2 @@ -76288,6 +76296,24 @@ msgstr "[[[8]]] https://www.kernel.org/pub/software/scm/git/docs/git-bisect.html msgid "[[[9]]] https://github.com/Ealdwulf/bbchop[Ealdwulf. 'bbchop'. GitHub.]" msgstr "[[[9]]] https://github.com/Ealdwulf/bbchop[Ealdwulf. 'bbchop'. GitHub.]" +#, no-wrap, placeholders:'HEAD':'HEAD':'------------------------------------------------------------':'--soft':'--mixed':'--hard':'--merge':'--keep' +#~ msgid "" +#~ "工作树 索引 HEAD 目标 工作树 索引 HEAD\n" +#~ "------------------------------------------------------------\n" +#~ " A B C C --soft A B D\n" +#~ "\t\t\t --mixed A C C\n" +#~ "\t\t\t --hard C C C\n" +#~ "\t\t\t --merge (不允许)\n" +#~ "\t\t\t --keep A C C\n" +#~ msgstr "" +#~ "工作树 索引 HEAD 目标 工作树 索引 HEAD\n" +#~ "------------------------------------------------------------\n" +#~ " A B C C --soft A B C\n" +#~ "\t\t\t --mixed A C C\n" +#~ "\t\t\t --hard C C C\n" +#~ "\t\t\t --merge(不允许)\n" +#~ "\t\t\t --keep A C C\n" + #~ msgid "Provide content or type and size information for repository objects." #~ msgstr "为仓库对象提供内容或类型和大小信息。"