git - Restart/undo conflict resolution in a single file


In a larger git merge with several conflicting files, I incorrectly marked a file as resolved (using git add FILE after some editing)

Now I'd like to undo my conflict resolution attempt and start over resolving that file.

How can I do that?

All Answers
  • Translate

    Found the solution here:

    git checkout -m FILE

    This restores the unresolved state, including all information about parent and merge base, which allows restarting the resolution.

  • Translate
    git reset HEAD FILE


    $ git status
    # On branch master
    # Changes to be committed:
    #   (use "git reset HEAD <file>..." to unstage)