I am not able to finish the merge always appears this error:

Asked

Viewed 887 times

1

fatal: Exiting because of an unresolved conflict.
U       course-git-blog-project

When I merged a branch, it conflicted with the code on the master branch. I correct the code in hand, saved index.html but can’t exit the specific branch or merge the code correction. I don’t know if it was because I didn’t switch to the branch that contained the conflict before changing the errors in the hand, but now I can’t get out of place. I don’t know if the error is in the Course-git-blog-project folder that I deleted in a branch and not in master.

Error screen: Print do erro

  • After editing the conflicted file, you have already done the git add of it? And then the git commit to finish the merge?

  • I did and the error is this: fatal: cannot do a partial commit During a merge.

  • This is a sign that you have not finished solving all conflicts. How is the git status? What he shows of unresolved conflicts?

  • From what I’ve seen, wear git commit -i <file> I could use one but when I use the other error. $ git commit -i index.html&#xA;error: Committing is not possible because you have unmerged files.&#xA;hint: Fix them up in the work tree, and then use 'git add/rm <file>'&#xA;hint: as appropriate to mark resolution and make a commit.&#xA;fatal: Exiting because of an unresolved conflict.&#xA;U course-git-blog-project

  • git status looks like this: Wemerson (master *+|MERGING) new-git-project&#xA;$ git status&#xA;On branch master&#xA;You have unmerged paths.&#xA; (fix conflicts and run "git commit")&#xA; (use "git merge --abort" to abort the merge)&#xA;&#xA;Changes to be committed:&#xA;&#xA; deleted: .gitignore/#course-git-blog-project&#xA; modified: index.html&#xA;&#xA;Unmerged paths:&#xA; (use "git add <file>..." to mark resolution)&#xA;&#xA; added by them: course-git-blog-project&#xA;&#xA;Wemerson (master *+|MERGING) new-git-project&#xA;$

  • Did I have to add the folder to the starging Index as well?

  • The 'git status' is fucking, man thanks, long time breaking your head here, with the problem under your nose. git status told me what was missing. Thanks.

  • 2

    @Jeffersonquesado, as he helped his colleague to solve his problem, I suggest providing an answer to the question :)

  • 1

    @Dherik thanks for reminding. I’ll see if I can do something in a few moments, but if you want to answer too, feel free.

  • git status was reporting the conflict but had not created the custom of checking staus. When I looked there was the answer. That’s what it was all about.

Show 5 more comments

1 answer

1


The error indicates that you still have a last merge conflict that needs to be resolved.

To view the status of your current repository, use the command:

git status

This command will probably show the conflicted file course-git-blog-project. Open the file, find the conflict point, edit the file to look the way it should look, and resolve the conflict with:

git add course-git-blog-project

After this, you can execute the command git commit that Git will open a commit message confirmation for conflict resolution.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.