gitgit-revert

error: Reverting is not possible because you have unmerged files


When trying to revert a specific commit in git, I'm getting this error:

$ git revert aaaf93201a28a57d540d633b1b723b8e513a47ed
error: Reverting is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm '
hint: as appropriate to mark resolution and make a commit.
fatal: revert failed

Is this about merge conflicts? But why does it say "unmerged files" in that case?


Solution

  • If you want to revert to the previous state of your work do:git merge --abort