码迷,mamicode.com
首页 > 其他好文 > 详细

Git代码冲突解决办法

时间:2015-02-27 00:20:23      阅读:249      评论:0      收藏:0      [点我收藏+]

标签:

命令行git pull产生冲突后,手工编辑冲突文件并保存,之后再执行git add -u命令添加变化的文件,再commit并push即可。具体参考如下文章

http://stackoverflow.com/questions/12192649/git-help-userinterfacestate-xcuserstate-warning-merge-conflict-file-still-mar

When there is a merge conflict, you MUST resolve it first. (well maybe you can run git merge --abort to revert).

So the process is you open your conflicting file, you look for the conflict, resolve it (edit the conflicting lines), then save your file, add it (using git add -u) and commit it.

Then you can work on a clean work directory.

By the way, a conflict probably looks like:

<<<<<<< yours:sample.txt Conflict resolution is hard;

let‘s go shopping.

Git makes conflict resolution easy.

theirs:sample.txt reference: http://www.kernel.org/pub/software/scm/git/docs/git-merge.html

Git代码冲突解决办法

标签:

原文地址:http://www.cnblogs.com/wolfcamel/p/4302408.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!