Download a file and it changes from LF to CRLF. How to stop?

Answered

I've just used the "download from here" option in the REMOTE HOST panel.  When the file arrives, it has different line endings.  On the server its LF when it arrives its CRLF.  Then git tells me they are different.  Seems unusual that the action of downloading alone would cause the line endings to change, so suspect its some other setting.

Followed the steps here:

https://intellij-support.jetbrains.com/hc/en-us/community/posts/205969644/comments/205115784

In the hopes this is the same issue that I'm having, but it feels slightly different.  I'm wanting the file that arrives to be the same as the file on the server line endings and all.  Or if thats not possible, a way to mass select all files that have arrived and choose to make their line endings LF without having to do it one by one.

0
2 comments

Something weird going on.  After changing the files from CRLF to LF git still is showing them in the 'Version Control' panel, but each file has "Contents are Identical"

0

Think I've got it.

[code]git config --global core.autocrlf false[/code]

Then in PREFERENCES -> VERSION CONTROL -> GIT -> (uncheck) Warn if CRLF line separators are about to be committed

Seems to ignore the line endings now. :) happy.

 

3

Please sign in to leave a comment.