gre*_*emo 0 git version-control branch branching-and-merging git-branch
我刚刚开始学习git版本控制,我正面临着这个问题.鉴于以下分支结构(取自免费书籍):

我们假设C4/C5提交改变了index.html文件的相同部分.
git checkout master
git merge iss53
Run Code Online (Sandbox Code Playgroud)
如果我理解它,我需要手动解决冲突.这本书讲述了冲突文件.这个冲突文件在哪里?鉴于以下冲突,如何:
<<<<<<< HEAD:index.html
<div id="footer">contact : email.support@github.com</div>
=======
<div id="footer">
please contact us at support@github.com
</div>
>>>>>>> iss53:index.html
Run Code Online (Sandbox Code Playgroud)
我可以丢弃HEAD的所有更改,仅将"iss53"分支的更改合并为"master"吗?如何编辑这些行?
冲突的行将存在于冲突文件中.因此,如果您的index.html文件存在冲突,您只需在文本编辑器中打开它即可获得上面的视图.
您将要删除不需要的行(和/或进行更改),然后保存文件.然后git add index.html,和git merge --continue.
或者,请查看使用git mergetool http://www.kernel.org/pub/software/scm/git/docs/git-mergetool.html