Is because u have 2 head sections git doesn't know wich one is the right one that's why he shows u where conflicts are. Best way is to work with comments so he knows the difference when u merge.
Resolving merge conflicts automatically
In cases when you prefer the work of other developers rather than yours, you can mention the appropriate strategy to resolve the conflicts by giving the preference to other developers' work.
git pull -s recursive -X theirs <remoterepo or other repo>
Or, simply, for the default repository:
git pull -X theirs
If you have already pulled without using the theirs strategy and want to give the preference to the work of other developers in one of the conflicting files, then run the command below:
git checkout --theirs path/to/file
If you are already in a conflicted state and want to give the preference to the work of other developers in all the conflicting files, then run the git checkout and git add commands:
git checkout --theirs .
git add .
If you give the preference to the code, written by yourself, then you should use --ours , instead of --theirs as follows:
git checkout --ours .
git add .
However, this is drastic, so make sure before running it.
You may not use the "." and type the file name in place of the dot to checkout.
You can also use the recursive --theirs strategy option with git merge:
git merge --strategy-option theirs