Here is a test: git init -q crlf-test cd crlf-test echo '* text=auto' > .gitattributes git add .gitattributes git commit -q -m "Normalize EOL" echo -ne 'some content\r\nother \rcontent with CR\r\ncontent\r\nagain content with\r\r\n' > inline-cr.txt echo "Working directory content:" cat -A inline-cr.txt echo git add inline-cr.txt echo "Indexed content:" git show :inline-cr.txt | cat -A Result ------ File content: some content^M$ other ^Mcontent with CR^M$ content^M$ again content with^M^M$ Indexed content: some content^M$ other ^Mcontent with CR^M$ content^M$ again content with^M^M$ Expected result --------------- File content: some content^M$ other ^Mcontent with CR^M$ content^M$ again content with^M^M$ Indexed content: some content$ other ^Mcontent with CR$ content$ again content with^M$ # or even 'again content with$' for this last line If you remove the \r that are not at the end of the lines, EOL are converted as expected: File content: some content^M$ other content with CR^M$ content^M$ again content with^M$ Indexed content: some content$ other content with CR$ content$ again content with$ -- Alex -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html