Merge Conflict
Sometimes merging cannot be done automatically. This is called by a merge conflict, which basically means that the two branches changed the same part of a file. Git will modify the conflicting file to have both versions. The two versions are separated by greater than (>), equals (=) and less than (<) signs. It is your task to determine what the correct version is and make sure the merge is correct.
Always check if merging worked out before you commit the resolved merge conflict. Make sure your code still works afterwards by compiling and running the tests for example.
When the merge fails the affected files will be listed in the output using the following format;
CONFLICT (content): Merge conflict in <file>
Resolve the conflicts in these files in your editor and commit the changes to finalise the merge.
Assignment
Merge the branch
main
into themerge_readme
branch (NOT THE OTHER WAY AROUND) and resolve the conflicts. Make the new title become the title of themain
branch, but the contents be the contents from themerge_readme
branch. Make sure togit add
andgit commit
and push the changes you made to themerge_readme
branch.