4

I have a developer that's works with me and randomly his files get changed to CRLF line endings.

In github for windows it shows the correct change before commit, and when committed the line endings get changed and it shows a bad diff.

This only happens randomly, but cant figure out why it is changing.

Chris Muench
  • 17,444
  • 70
  • 209
  • 362
  • I don't know how to fix this, but take a look at [EditorConfig](http://editorconfig.org/) it fix things like this. – Wouter J Jul 22 '12 at 16:14

3 Answers3

7

Drop to the command line instead of using Github for windows. MSysGit will follow more closely what is implemented for git by the maintainers of the main git source code.

git config --system core.autocrlf false
git config --system core.whitespace cr-at-eol

Don't let your version control system mess with your line endings unless it absolutely has to.

Adam Dymitruk
  • 124,556
  • 26
  • 146
  • 141
0

As mentioned in "Android line breaks and git":

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

v1.0.7 takes care of this. Here's a nice article.

Franz
  • 11,353
  • 8
  • 48
  • 70