git merge manual中是不是写错了?
仅有的幸福
仅有的幸福 2017-06-17 09:15:35
[Git讨论组]

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点,只是原文的表述没有那么清晰罢了。

仅有的幸福
仅有的幸福

全部回复(1)
仅有的幸福

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

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

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

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

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号