educative.io

How to correct merge conflict

What should i actually do to correct this merge?

root@educative:/lgthw_merging# cat file1
A
B
C
<<<<<<< HEAD
D
F
G

E
H

experimental

Do i just remove the lines that have === and >>>


Type your question above this line.

Course: https://www.educative.io/collection/10370001/6075350136651776
Lesson: https://www.educative.io/collection/page/10370001/6075350136651776/6272927020875776

Hello,

Git has the job of identifying and showing which areas of the code need to be looked over again. In this case:

A
B
C
<<<<<<< HEAD
D
F
G
=======
E
H
>>>>>>> experimental

If you think the experimental code(between the equal signs and greater than signs) is better you may save the file like this:

A
B
C
E
H

Again, as mentioned in the lesson Git will not care if you save and commit still including the conflict identifiers ======= or >>>>>>>.

ok thanks, much appreciative.