GIT error: You have not concluded your merge (MERGE_HEAD exists)

An error was reported when using the git pull command: error: You have not concluded your merge (MERGE_HEAD exists)

insert image description here

meaning is:

  1. You still have MERGE_HEAD that has not yet been merged
  2. Tip: Please commit your changes before merging
  3. exit due to incomplete merge

There are two solutions

Solution 1: execute commit first, then manually merge, and then push to the remote end

Solution 2: Since I have a lot of conflicting files, most of the bugs have also been fixed by other employees. So I chose to give up this modification directly, then re-pull the code, manually modify the conflicting code, and merge and upload

git merge --abort   // 终止合并
git reset --merge   // 重置合并
git pull			 // 重新拉取代码

picture.png

Suggestion: When using git pull, do not have modified code locally and have not submitted it. If the modified code is code that does not need to be submitted, you can use git stash to store it temporarily. After the git operation is completed and there is no problem, use git stash Apply can be restored to the local.

Guess you like

Origin blog.csdn.net/chy555chy/article/details/128733269