Monday, February 1, 2010

You’re in the middle of a conflicted merge (git)

Trying to update (pull) in git causes the error ‘you’re in the middle of a conflicted merge’.

How to resolve a Git Conflict? 

NOTE: Take a backup of your code before you do this. This will remove all your changes and revert to master branch!!

To be able to get out of this error try the followng:

  1. git reset --hard HEAD
  2. git fetch origin
  3. git reset --hard origin
to reset the state, and then you should be able to use git pull as normal.

This site helped me when i faced this problem -

No comments: