git merge manual中是不是写错了?

查看:86
本文介绍了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 diverged 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 diverged 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 diverged 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 diverged from master(i.e.,E)似乎是写错了。
我并不了解Git在计算合并时的算法,所以以上的理解只是从原文的翻译中来理解,或许在实际计算中,确实需要考虑E点,只是原文的表述没有那么清晰罢了。

解决方案

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

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

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

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

这篇关于git merge manual中是不是写错了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆