合并后代表错误的第一个父项的GitHub网络图 [英] GitHub network graph representing wrong first parent after merge
问题描述
/ niagara / networkrel =nofollow noreferrer>网络图,我的GitHub存储库叫做
niagara
到的输出> git log --graph --all --oneline --decorate
:
* 13d9ccc(origin / dev,dev)编辑printState
* 32e4285添加支持为不同的珠宝
* 23f6c5d修复天气应用
* 4236119重构
* a731e72(重构)将分支'修复'合并到开发
| \
| * 6d3ca43(修复)修复winrate决心
| * 5f39b62修复天气应用到第二艘船
| * 8e2b813修复赢条件
| * 57fc73d修复赢得比例
| * 48b8a0f修复possibleMove
| /
* dabc470(HEAD,origin / master,master)合并来自axsk / boats的请求#1
编辑:
绿色分支上的前五个节点对应于五个连续的修复提交( 48b8。 .6d3c
),我在(本地)修复
分支中提交,其头部位于 6d3c
。
然后我将修复
分支与 - no一起合并到
。这在 dev
分支中-ff git log
的输出中正确显示,但GitHub只显示绿色弯曲的箭头而不是修复程序的单独分支
commit。
我是否错了,或者这是GitHub方面的某种错误?
据我所知,你是对的:有些东西是关闭的。特别地,那个弯曲的绿色箭头似乎表明提交 a731e72 的父母
6d3ca43
是两次 code>,这是没有意义的。
据我所知,在Git中,没有办法提交 2 父母实际上是同一个人。即使你处于以下情况(你的工作目录是干净的),
o - o [master = HEAD ,开发]
运行
git merge --no-ff develop
是无操作的:该命令的输出只是简单的
已经是最新的。
结论:我的感觉是这是GitHub的一个bug ...
更新:我联系了GitHub对此的支持,他们回到我身边。阅读下面。
感谢您将我们的注意力集中在该网络图上 - 我同意这看起来很混乱。我已经开通了一个内部问题让我们的团队知道这一点,我们会尽快回复您。
I've found a discrepancy between the GitHub network graph and the git log.
Compare the network graph of my GitHub repository called
niagara
to the output of
git log --graph --all --oneline --decorate
:* 13d9ccc (origin/dev, dev) edit printState * 32e4285 add support for different jewels * 23f6c5d fix weather application * 4236119 refactor * a731e72 (refactor) Merge branch 'fix' into dev |\ | * 6d3ca43 (fix) fix winrate determination | * 5f39b62 fix weather application to second boat | * 8e2b813 fix win condition | * 57fc73d fix win percentage | * 48b8a0f fix possibleMove |/ * dabc470 (HEAD, origin/master, master) Merge pull request #1 from axsk/boats
Edit: The first five nodes on the green branch correspond to the five consecutive fix commits (
48b8..6d3c
), which I commited in the (local)fix
branch, whose head is at6d3c
. I then merged thefix
branch to thedev
branch with--no-ff
. This is correctly displayed in the output ofgit log
, but GitHub just shows the green curved arrow instead of a separate branch for thefix
commits.Am I getting something wrong or is this some kind of bug on GitHub's side?
解决方案As far as I can tell, you're right: something is off. In particular, that curved green arrow seems to indicate that commit
6d3ca43
is "twice" a parent of commita731e72
, which makes no sense.
As far as I know, there is no way, in Git, for a commit to have two parents that are actually one and the same. Even if you're in the following situation (and your working directory is clean),
o -- o [master=HEAD,develop]
running
git merge --no-ff develop
is a no-op: the output of that command is simply
Already up-to-date.
Conclusion: my feeling is that it is a bug on GitHub's side...
Update: I contacted GitHub's support about this and they got back to me. Read below.
Thank you for calling our attention to that network graph -- I agree that looks confusing. I've opened an internal issue to let our team know about this, and we'll get back to you as soon as we have more information.
这篇关于合并后代表错误的第一个父项的GitHub网络图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!