2

So I've been working on a Love2D project, and Nixola helped me with a code issue (check out my post about it here) but he pulled my code on Github here and then I merged his code into my repo. At the same time as this I was writing a bit more code, but I did not sync as soon as I merged Nixola's code. It then made duplicates of most of my code, so I deleted the Code I didn't want. I then tried to sync the code, but it gives this error:

Failed to sync this branch due to unmerged files

It appears that you may be in a merge conflict. Open the Get Shell and resolve the conflicts in your working directory before attempting to sync again.

How can I fix this and get my repo back to a working state?

JackWhiteIII
  • 1,388
  • 2
  • 11
  • 25
MattyAB
  • 365
  • 2
  • 9
  • 19
  • It error is saying you have merged some code/files from others. After that some conflicts took place in your code due to the merge. All you need to do is see which files has conflicts , open those files and resolve the conflicts. If you have full trace on the command line after the merge please paste that. – Prabhakar Jun 20 '15 at 11:33
  • I've done that, but It still gives the errors. What am I doing wrong? – MattyAB Jun 20 '15 at 11:51
  • What is the error message. Please paste the entire message – Prabhakar Jun 20 '15 at 11:55
  • I've made it so that it doesn't show any changes in the file, but it still won't sync. – MattyAB Jun 20 '15 at 11:56
  • Failed to sync this branch due to unmerged files It appears that you may be in a merge conflict. Open the Get Shell and resolve the conflicts in your working directory before attempting to sync again. – MattyAB Jun 20 '15 at 11:56
  • That is all that it says – MattyAB Jun 20 '15 at 11:57

1 Answers1

3

Use git status to determine whether this is a traditional or deleted file conflict.

If this says "both modified", open the file in a text editor, resolve the conflicts which will be marked with ==========, then git add yourfile and git commit.

If this says "deleted by ...", run git rm yourfile or git add yourfile with the correct contents, then git commit.

A complete walkthrough of the process is in the git documentation, here: https://help.github.com/articles/resolving-a-merge-conflict-from-the-command-line/

Barett
  • 5,826
  • 6
  • 51
  • 55
poros
  • 386
  • 3
  • 12