Explore Courses Blog Tutorials Interview Questions
0 votes
in DevOps and Agile by (29.3k points)

I made a branch called 'f' and did a checkout to master. When I tried the git pull command I got this message:

You have not concluded your merge (MERGE_HEAD exists).

Please, commit your changes before you can merge.

When I try the git status, it gave me the following:

On branch master

# Your branch and 'origin/master' have diverged,

# and have 1 and 13 different commit(s) each, respectively.


# Changes to be committed:


# Untracked files:

#   (use "git add <file>..." to include in what will be committed)


#   Coachbase/

#   log/development.log.orig

#   log/restclient.log.orig

what should I do?

1 Answer

0 votes
by (50.2k points)

The main reason for this kind of error is your previous pull failed to merge automatically and went to conflict state. And the conflict was not resolved before the next pull

To remove this you need to undo a merge and pull again

For that 

git merge --abort <since Git version 1.7.4>

git reset --merge<for Git version less than 1.7.4>

And then resolve the conflict and don’t forget to add and commit the merge then after that git pull command will work fine.

Browse Categories