Home > Enterprise >  Problem after git merge: unable to pull because unfinished merge and no staged files
Problem after git merge: unable to pull because unfinished merge and no staged files

Time:03-21

I have merged a branch to master on GitHub and wanted to do a git pull locally after that. When I did a git pull it asked me to commit changes, so I have added files and committed.

But something happened, and I am stuck kind of in the middle of the merge, although the merge is completed. I have an empty staging and when I try to do a git pull I get this error:

❯ git pull
error: You have not concluded your merge (MERGE_HEAD exists).
hint: Please, commit your changes before merging.
fatal: Exiting because of unfinished merge.
❯ git pull --force
error: You have not concluded your merge (MERGE_HEAD exists).
hint: Please, commit your changes before merging.
fatal: Exiting because of unfinished merge.

and on the line where I write in the console by the branch name I have

master merge 

Can someone tell me what is happening here and how to solve this problem? Thanks.

CodePudding user response:

Have you tried git merge --abort and tried to pull again?

From www.git-tower.com about merge-conflicts:

You should always keep in mind that you can return to the state before you started the merge at any time. This should give you the confidence that you can't break anything. On the command line, a simple git merge --abort will do this for you.

See also You have not concluded your merge (MERGE_HEAD exists)

  • Related