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?
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
==========
, thengit add yourfile
andgit commit
.If this says "deleted by ...", run
git rm yourfile
orgit add yourfile
with the correct contents, thengit 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/