解决合并的冲突

把issue2分支和issue3分支的修改合并到master。

切换master分支后,与issue2分支合并。

$ **git checkout master**
Switched to branch 'master
'$ **git merge issue2**
Updating b2b23c4..8f7aa27
Fast-forward myfile.txt | 2 ++ 
1 files changed, 2 insertions(+), 0 deletions(-)

执行fast-forward(快进)合并。

解决合并的冲突_第1张图片
capture_stepup2_7_1.png

接着合并issue3分支。

$ **git merge issue3**
Auto-merging myfile.txtCONFLICT (content): Merge conflict in myfile.txt
Automatic merge failed; fix conflicts and then commit the result.

自动合并失败。由于在同一行进行了修改,所以产生了冲突。这时myfile.txt的内容如下:

add 把变更录入到索引中
<<<<<<< HEAD
commit 记录索引的状态
=======
pull 取得远端数据库的内容
>>>>>>> issue3

你可能感兴趣的:(解决合并的冲突)