K
K
Konstantin Andreevich2014-10-18 15:06:52
git
Konstantin Andreevich, 2014-10-18 15:06:52

Problems with line endings in git (phpStorm), how to solve?

To be honest, I already butted with these line endings. I can't solve the problem once and for all.
In general, the problem is this. I'm on linux, working in phpStorm. The git has the settings "core.autocrlf input" and "core.safecrlf true".
In phpStorm, line endings are in LF by default.
Now I downloaded the archive with the files needed for my cms, unpacked it, did everything, I try to commit and I can’t, the error is "CRLF would be replaced by LF in ...".
Why are lines not translated to LF when committing? How to do it? What am I doing wrong, please help me. I'm already tired of translating files into LF with my hands.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Power, 2014-10-18
@reffy

Change core.safecrlf to warn
Then git will warn about irreversible newline conversions, but will not consider it an error.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question