To manually resolve a conflict, follow these steps:
-
Review the conflicts. Navigate to the classes that are marked for conflict and scroll to the areas with errors. You will notice code that is split by the following markers: <<<<<<<, =======, and >>>>>>>. The top section (HEAD) before the marker ======= contains the old code that was written before the pull, while the bottom section contains the code that was just pulled. Review the differences and delete one of the two, or merge the code together by manually deleting lines. Don’t forget to delete the markers once done.
-
Add class changes to index. Once all conflicts have been reviewed and edited in a class, right click on the class and navigate to Team > Add to index. Repeat this process for every class with conflicts in your project.
-
Commit changes. Once all conflicts have been manually resolved, right click on any class and navigate to Team > Commit.
Example of a merge/pull conflict:
Lines of code that are either unchanged from what was pulled, or were automatically resolved because only one side changed. <<<<<<< yours This is where the code that you wrote goes ======= This is where the conflicting code that was pulled goes >>>>>>> theirs More lines of code that were cleanly resolved or unmodified.
For more information, click here.