Github Merge问题(显示所有行)

I'm trying to merge two of my branches and while trying to resolve the conflicts I can usually just open up the file and github has added

">>>>HEAD
 {my code}
 ========
 {other code}
 >>>>Other"

this shows me which specific lines of code are different in the two versions and then I can decide which lines to keep. However, when I'm merging some of the PHP files don't show the exact differences. Instead the PHP file has my version on top with all the lines included and the other version on bottom. It's a lot harder trying to resolve conflicts this way. Are there any suggestions as to why this is happening? How can I resolve my conflicts in an easier way?

I tend just to fix the merges manually by editing the files. Hopefully you don't have to do that too often. However, there is a mergetool that I've seen people use.

http://www.kernel.org/pub/software/scm/git/docs/git-mergetool.html

Hoe that helps

That is a side-effect mentioned by Rich in his answer.

One little hiccup that I've noticed with this setup is that when there are merge conflicts, the lines git adds to mark up the differences do not have Windows line-endings, even when the rest of the file does, and you can end up with a file with mixed line endings

That is one more argument to avoid core.autocrlf true, and set it to false.