Debug School

rakesh kumar
rakesh kumar

Posted on

Git says "Automatic merge failed", what does it mean?

Error
git-says-automatic-merge-failed-what-does-it-mean
Git says "Automatic merge failed", what does it mean?

Image description

I tried to merge two branches and this is what i did and what happened:

Abdulla (Master) new-git-project1
$ git merge sidebar
Auto-merging index.html
CONFLICT (content): Merge conflict in index.html
Automatic merge failed; fix conflicts and then commit the result.
Abdulla (Master *+|MERGING) new-git-project1
$ git merge sidebar
error: Merging is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm '
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.

Solution:
follow on remote side ubuntu server
Step 1:
Run git status. It will output a list of what files are unmerged. These files will contain conflict markers that look similar to this:

Step 2:
Run git status. It will output a list of what files are unmerged. These files will contain conflict markers that look similar to this:
Step 2:
git add .
Step 3:
git commit -m "added"

Step 4:
git push origin master

Top comments (0)