[Solved] error: Pulling is not possible because you have unmerged files

Scene

For the same repository, Jane and Flora each pulled code from the master branch of the repository.
Jane commits the modified code to the master branch first.
Flora then commits the modified code to the master branch, and finds that the remote repository master branch code has changed due to Jane’s commit, which prompts “Updates were rejected because the tip of your current branch is behind” when committing. branch is behind”

When Flora tried to pull the master branch code for merging, it prompted “error: Pulling is not possible because you have unmerged files”

Solution:

git add -u 
git commit -m "xxxx" 
git pull
git push 

First, the file will be stored in the staging area and then commit the comments, and then git pull will not report an error
This kind of error is generally thought to have a conflict file, need to resolve the conflict or merge files, after the solution or merge need to recommit, not limited to pulling

Read More: