For me, this has always been a case of EOL character conflicts - i.e. CR vs LF vs CRLF. You may be using different tools or platforms that produce different line endings, especially if you're working on a team, and especially if you're using both Windows and Linux. Have a look at github's Dealing with line endings, and this comprehensive writeup on the old vs. new systems of handling things, and this SO link about core.whitespace.
Why does Git sometimes generate meaningless merge conflicts
-
14-04-2022 - |
Question
Quite frequently during rebases, Git generates a merge conflict like the following:
<<<<<<< HEAD
}
=======
}
>>>>>>> f192b7c... My commit description here
The two sections are, character-for-character, identical.
Is this a known bug? Using version 1.8.2 on OS X.
La solution
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow