git中的简单合并是什么? [英] What is a trivial merge in git?

查看:110
本文介绍了git中的简单合并是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时,当我在一个简单的文件更改提交后执行pull操作而不是rebase时,我在master日志中看到以下内容:


Trivial merge


但是没有什么差异?这条日志消息有什么意义?有什么改变我不知道?它吓到我了。 在任何一点的日志。我会大胆猜测,并假设你已经在gitweb中看到这条消息。



如果组合diff没有输出,gitweb会打印此消息。这种情况发生时,唯一的区别是所有区块只有合并的一方发生了变化,而这种变化是通过合并中未经修改的方式实现的。这基本上意味着没有冲突,并且在合并提交中添加了任何魔术。


Sometimes when I do a pull instead of a rebase after a simple one file change commit I see the following in the master log:

Trivial merge

But there's no diff of what changed? What's the point of this log message? Did anything change I don't know of? It scares me.

解决方案

git doesn't insert this message into the log at any point. I'm going to take a wild guess and assume that you've seen this message in gitweb.

gitweb prints this message if there is no output from a combined diff. This happens when the only differences were all in chunks were only one side of the merge changed, and this change was brought through unmodified in the merge. This basically means there were no conflicts and nothing magic was added in the merge commit.

这篇关于git中的简单合并是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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