Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restart/undo conflict resolution in a single file

Tags:

git

git-merge

People also ask

How do I undo a merge conflict resolution?

In case you've made a mistake while resolving a conflict and realize this only after completing the merge, you can still easily undo it: just roll back to the commit before the merge happened with "git reset --hard " and start over again.


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.