You need to resolve your current index first

A branch from A switch to another branch B, to pull switch B branch after the operation, because of the pull actually contains the fetch + the merge operation, when performing the merge operation, due to long time no out the pull of B branch/merge operation, the local treasuries and remote B B difference is very big in the subsidiary (and these differences is the development of other colleagues files), when the merge conflict, causing the B branch state for merging, actually refers to the failed to merge, Stuck in the merge state, and unable to perform pull operations. Instead of resolving the conflict, instead of executing checkout/switchto from the B branch and attempting to switchto another branch, the report is:
[plain] view plaincopy in CODE looks at the CODE slice that is descended to my CODE slice

… Java: needs merge
…… Java: needs merge
…… Java: needs merge
error: you need to resolve your current index first

>, googled for a long time, finally found the answer on stackoverflow, the question is: merge failed, due to conflicts, can:

1, execute merge again after conflicts;

2, back to merge

well, since the merge conflict is a colleague’s file, I don’t need to resolve conflicts, then back to merge, just change my file and push, run the following code:

git reset –merge

done!

by the way, could you stick the stackoverflow links:

http://stackoverflow.com/questions/6006737/git-merge-errors

Read More: