1

A file I am working on has both crlf and lf modes. Upper half is crlf and lower half lf. When I save it in lf mode, git diff shows modification in upper half and when I save it in crlf mode, git diff shows modification in lower half. I want to keep the file as is and add some of my changes. How should I go round that?

Meet Joshi
  • 11
  • 3
  • 3
    Change to one or the other and commit the changes. I would do this as a separate commit before commit your other changes. – Code-Apprentice Aug 22 '16 at 23:08
  • What text editor are you using? – Messa Aug 22 '16 at 23:10
  • I was using sublime. Then I read this: https://en.wikipedia.org/wiki/Comparison_of_text_editors#Newline%5Fsupport and https://en.wikipedia.org/wiki/Comparison_of_text_editors#Basic%5Ffeatures & switched to geany. – Meet Joshi Aug 22 '16 at 23:13
  • See (http://stackoverflow.com/questions/1889559/git-diff-to-ignore-m) for how to handle eol in git. – gzh Aug 22 '16 at 23:59

0 Answers0