Chris Muench
Chris Muench

Reputation: 18338

Github for windows changing line endings on commit

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.

Upvotes: 4

Views: 6489

Answers (3)

Franz
Franz

Reputation: 11553

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

Upvotes: 0

VonC
VonC

Reputation: 1329822

As mentioned in "Android line breaks and git":

Upvotes: 0

Adam Dymitruk
Adam Dymitruk

Reputation: 129782

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.

Upvotes: 7

Related Questions