Why editing two different lines result in merge conflict in git?

264 Views Asked by At

I have a single text file, in initial commit

Line1
Line2

I created branch from master, and committed this changes

Line1-b1
Line2

Finally I checkout to master and created this commit,

Line1
Line2-b2

When I try to merge to master , I got the following merge conflict, why? since the two lines are different, I was not expecting merge conflict.

<<<<<<< HEAD
Line1
Line2-m
=======
Line1-b1
Line2
>>>>>>> b1
0

There are 0 best solutions below