Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

变基章节,更有趣的变基例子中,翻译有不准确,或者容易有歧义的地方 #388

Closed
tidus5 opened this issue Nov 21, 2019 · 3 comments · Fixed by #401

Comments

@tidus5
Copy link

tidus5 commented Nov 21, 2019

页面章节:
https://git-scm.com/book/zh/v2/Git-%E5%88%86%E6%94%AF-%E5%8F%98%E5%9F%BA

有疑问的原译文:
Figure 39. 从一个特性分支里再分出一个特性分支的提交历史
...
$ git rebase --onto master server client
以上命令的意思是:“取出 client 分支,找出处于 client 分支和 server 分支的共同祖先之后的修改,然后把它们在 master 分支上重放一遍”。 这理解起来有一点复杂,不过效果非常酷。

英文原文:
This basically says, “Take the client branch, figure out the patches since it diverged from the server branch, and replay these patches in the client branch as if it was based directly off the master branch instead.” It’s a bit complex, but the result is pretty cool.

其中,英文原文的描述比较直接清楚:取出client分支,找到client分支从server分离后的提交,把这些提交放到master分支上重放一遍,让client的修改看起来像直接在master上修改一样

而原译文写的,“找出处于 client 分支和 server 分支的共同祖先之后的修改”,共同祖先是C3,之后的修改有server分支的C4和C10,client分支的C8,C9。 但并不是这4个提交都会重放到master,而是只有client分支的 C8和C9 会被重放到master。

@tidus5
Copy link
Author

tidus5 commented Nov 21, 2019

另外,变基的风险中,那条准则理解起来也不大直观。

不要对在你的仓库外有副本的分支执行变基。
不妨考虑直译:
Do not rebase commits that exist outside your repository and people may have based work on them.
如果提交存在于你的仓库外,而且别人可能基于这些提交进行开发,那么不要执行变基。

英文总是修饰的从句太长,翻译过来中文可能都得断成几个短句才能直译。
当然,使用归纳总结后的意译,比较精简。
但对于“我的仓库外有副本的分支”,这个概念不大好理解,是指的推送到远端的分支?
那对于从远端拉过来的分支,而本地有未push的提交,也不要进行变基?(其实是可以)

英文原文解释了原因-- 别人可能基于此上开发。 原译文省略了这点,而且将提交 改为分支。
容易让人困惑。只能看了后文勉强知道出了什么问题。
而对这个准则,却完全get 不到想表达的准确意思。

@networm
Copy link
Member

networm commented Nov 21, 2019

非常好,你可以考虑直接提一个 PR 修改此问题。

@OlingCat
Copy link
Contributor

OlingCat commented Mar 3, 2020

感谢建议,本 issue 将在 #391 完成后修复。

OlingCat added a commit to OlingCat/progit2-zh that referenced this issue Mar 14, 2020
@OlingCat OlingCat mentioned this issue Mar 14, 2020
networm pushed a commit that referenced this issue Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants