首页 >社区问答列表 >git merge manual中是不是写错了?

git merge manual中是不是写错了?

git manual中的 git merge 一文,地址:
https://git-scm.com/docs/git-...

我发现有个地方是不是写错了?请熟悉git的朋友看一看。
原文如下:
Incorporates changes from the named commits (since the time their histories perged from the current branch) into the current branch. This command is used by git pull to incorporate changes from another repository and can be used by hand to merge changes from one branch into another.

Assume the following history exists and the current branch is "master":

  A---B---C topic
 /
D---E---F---G master

Then "git merge topic" will replay the changes made on the topic branch since it perged from master (i.e., E) until its current commit (C) on top of master, and record the result in a new commit along with the names of the two parent commits and a log message from the user describing the changes.

原文中,Then "git merge topic" will replay the changes made on the topic branch since it perged from master(i.e.,E) until its current commit(C) on top of master,
git merge topic 命令会把【topic分支上,从“与 master 分支的分叉点”开始,到“topic分支的当前提交(C点)”的变化】在master上重放,并且把这个重放的结果记录在新的提交中,......
我认为,与master分支的分叉点,应该是A,而不是E,原文中 since it perged from master(i.e.,E)似乎是写错了。
我并不了解Git在计算合并时的算法,所以以上的理解只是从原文的翻译中来理解,或许在实际计算中,确实需要考虑E点,只是原文的表述没有那么清晰罢了。

  • 仅有的幸福
  • 仅有的幸福    2017-06-17 09:17:351楼

    你看的怎么和我看的不一样:

    Assume the following history exists and the current branch is "master":

          
          A---B---C topic
         /
    D---E---F---G master
    

    这个分支的分叉点就是从 E 开始的.

    +0添加回复

  • 回复