In my case it wasIt might be the existence of Unmerged paths that was causingcause
error: Merging is not possible because you have unmerged files.
TryIf so, try:
git status
if it says
You have unmerged paths.
do as suggested: either resolve conflicts and then commit or abort the merge entirely with
git merge --abort
You might also see files listed under Unmerged paths, which you can resolve by doing
git rm <file>