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

Git常用命令(三)解决cherry-pick和rebase冲突

时间:2015-03-19 10:14:19      阅读:1647      评论:0      收藏:0      [点我收藏+]

标签:git   常用命令   rebase冲突   cherry-pic   

git fetch git@168.168.0.253:mediaTek/8127.git master_mlc
git cherry-pick ea196a1c06ab4afe9ee49f06751e4c73c38b95e8(master_mlc上面的提交)
出现冲突:


error: could not apply ea196a... *****
hint: after resolving the conflicts, mark the corrected paths
hint: with ‘git add ‘ or ‘git rm ‘
hint: and commit the result with ‘git commit‘

然后git status,发现一个Unmerged paths:

both modified: src/conflictsfile.mk

然后执行:git mergetool
默认选择vimdiff,回车进入:
眼花缭乱,我不在此修改,q命令依次退出这几个窗口。会询问我们冲突是否已经解决:

src/conflictsfile.mk seems unchanged.
Was the merge successful?[y/n]

输入y回车,然后git status发现冲突的文件已经添加:

Changes to be committed:
modified:  src/conflictsfile.mk

然后手动编辑冲突的文件,使其内容和master_mlc分支上的内容一致,
然后git add此文件,最后执行git cherry-pick –continue即可。
———(注:git rebase 出现的冲突解决方法与此一致,最后的命令是:git rebase –continue)

我在这些地方:技术分享 CSDN 技术分享 GitHub 技术分享 微博

Git常用命令(三)解决cherry-pick和rebase冲突

标签:git   常用命令   rebase冲突   cherry-pic   

原文地址:http://blog.csdn.net/zhoumushui/article/details/44452129

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