Git Merge Branches Conflict

I tried to Merge a Branch let's say branch-good into Master branch as branch-good is the one upto date with changes so whilst on branch-good I did following

git merge --strategy=ours master   
git checkout master
git merge branch-good

Now after I made my last commit i changed two files that i forgot to commit before performing above task. This has cause merge conflict and now i'm not able to got back to the branch-good so i can add those files to my last commit as git gives me Cannot save the current index or You need to resolve your current index first errors. How to get out of this ?


You need to fix those merge conflicts. First, run git status to see exactly the errors and what files have them. Then, see here: https://help.github.com/articles/resolving-a-merge-conflict-from-the-command-line/ and fix those conflicts on the files that git status showed. After resolving the conflicts, you can continue working.

链接地址: http://www.djcxy.com/p/41732.html

上一篇: Antlr的优势(比如说,lex / yacc / bison)

下一篇: Git合并分支冲突