git错误--error: Merging is not possible because you have unmerged files. hint: Fix them up in the work

git错误--error: Merging is not possible because you have unmerged files. hint: Fix them up in the work

这样的错误是本地的文件和未提交(commit)的文件有差异。所以,在这里先使用git status

然后 git add 差异文件。然后在git commit。但是,这里又会出现一个问题。

git错误--error: Merging is not possible because you have unmerged files. hint: Fix them up in the work

这个时候使用 git push -f origin master

git错误--error: Merging is not possible because you have unmerged files. hint: Fix them up in the work

然后切换分支到master。

建议在分支开发。