Git merge error "commit is not possible because you have unmerged files"

Solution 1:

If you have fixed the conflicts you need to add the files to the stage with git add [filename], then commit as normal.

Solution 2:

You need to do two things. First add the changes with

git add .
git stash  

git checkout <some branch>

It should solve your issue as it solved to me.

Solution 3:

You can use git stash to save the current repository before doing the commit you want to make (after merging the changes from the upstream repo with git stash pop). I had to do this yesterday when I had the same problem.

Solution 4:

This error occurs when you resolve the conflicts but the file still needs to be added in the stage area. git add . would solve it. Then, try to commit and merge.