Reputation: 18338
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
Reputation: 1329822
As mentioned in "Android line breaks and git":
core.autocrlf
is set to false (see "Definitive recommendation for git autocrlf settings").gitattributes
files with eol
directives in them which would impose, for a certain file extension, a particular eol style.Upvotes: 0
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