Restart/undo conflict resolution in a single file

GitGit Merge

Git Problem Overview


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?

Git Solutions


Solution 1 - Git

Found the solution here: http://gitster.livejournal.com/43665.html

git checkout -m FILE

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAlex KraussView Question on Stackoverflow
Solution 1 - GitAlex KraussView Answer on Stackoverflow