DEV Community

Discussion on: ELI5: The git error - 'CRLF would be replaced by LF in...'

Collapse
 
hiboabd profile image
Hibo Abdilaahi • Edited

Thanks for taking the time out to write this detailed response! It’s nice to know others find it confusing too haha.

Yes you do get that message when committing and it prevents you from doing so. This explanation has helped me understand the error somewhat but I don’t see why I would get the message sometimes and not other times 😭 I think I need to keep a better eye on what I’m committing when the error happens which might shed some more light...

Thanks again!!

Collapse
 
jsn1nj4 profile image
Elliot Derhay • Edited

It may depend on whether there's a mix of line ending styles in a file. I haven't really looked into it myself. I just got sick of the warnings at some point and switched completely over to LF.

If I remember correctly, there may also be a way to completely disable warnings from Git. But I think it disables all of them, not just this one.

Happy to help when I can. Sorry I wasn't able to help resolve that specific issue.

Thread Thread
 
hiboabd profile image
Hibo Abdilaahi

Ahhh thanks I’ll look into switching for the future! No problem at all, you’ve already been helpful and I was able to easily get past the error. It’s just not the first time it’s happened so I’m wondering how to prevent it full stop, if possible.