git Error: Path is unmerged.
Feb 9, 2021
I want to undo some changes on git like this
$ git checkout HEAD foo/bar.txt
error: path 'foo/bar.txt' is unmerged
$ git reset HEAD foo/bar.txt
Unstaged changes after reset:
M foo/bar.txt
And ended up with the error above.
These commands made my way.
$ git reset foo/bar.txt
$ git checkout foo/bar.txt
BOOM!