【发布时间】:2016-11-09 06:43:11
【问题描述】:
我正在测试git merge的一些情况
我创建了一个 sample.txt,请参阅下面的后续操作
添加然后提交到主分支
sample.txt 包含
aaa
bbb
创建并签出到 branch1 并编辑 sample.txt---添加然后提交
branch1 sample.txt
aaa
bbc
签出到master并编辑sample.txt---添加然后提交
master sample.txt
aad
bbb
运行git merge branch1我收到以下通知
Auto-merging sample
CONFLICT (content): Merge conflict in sample
Automatic merge failed; fix conflicts and then commit the result.
sample.txt 包含
<<<<<<< HEAD
aad
bbb
=======
aaa
bbc
>>>>>>>> branch1
master 在第 1 行进行了编辑
branch1 在第 2 行进行了编辑
如果我在 master 和 branch1 上编辑第 1 行,我会理解合并冲突
这种情况下的合并冲突是什么?
下面怎么有sample.txt的输出?
aad
bbc
【问题讨论】:
-
请不要无故添加语言标签。
标签: git