Git: can't undo local changes (error: path ... is unmerged)
Solution 1:
You did it the wrong way around. You are meant to reset first, to unstage the file, then checkout, to revert local changes.
Try this:
$ git reset foo/bar.txt
$ git checkout foo/bar.txt
Solution 2:
This worked perfectly for me:
$ git reset -- foo/bar.txt
$ git checkout foo/bar.txt
Solution 3:
git checkout origin/[branch] .
git status
// Note dot (.) at the end. And all will be good