I modified different lines in different branches, but those changes occur git merge
conflict.
I read the post, but I think the changes occur in totally different lines.
Here are my test codes.
branch-base
Hello, my first conflict.
Second line.a # add a single character 'a' at line 2
Third line.
branch-a
Hello, my first conflict.
Second line.
Third line.a # add a single character 'a' at line 3
And I executed the following code, it says git merge conflict.
$ git checkout branch-base
$ git merge branch-a
Here's my conflict file.
Hello, my first conflict.
<<<<<<< HEAD
Second line.a
Third line.
=======
Second line.
Third line.a
>>>>>>> branch-a
Why this conflict happens? I think I made changes in totally different lines (although those are adjacent.)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…