Line terminator
- LF => Line Feed (ASCII 10)
- CRLF => Carriage Return + Line Feed (ASCII 13+10)
This is how the text lines of the file end. Either with just one character or with both. In general the first is preferred in one operating system (Linux for example) and the second preferred in another (Windows).
Line terminator is the way the end of each line of a text file is indicated. It needs some character to determine that the line is over. In general this character is not shown in the text in editors and listings but it is there in the file. Without it how would you know that the line has ended? We can say, very roughly, that this is the ENTER that is there.
Some editors have an option to display these characters in a special way.
The ideal is to always maintain the same standard (some software may even have problems because of this).
How Git Handles It
If there is no consistency Git can convert for you.
This message is only letting you know that it made the conversion for you.
You can change this behavior with:
git config core.autocrlf true
but the most common is to leave as
git config core.autocrlf input
You probably saved the file with a line terminator that is not desirable. Or maybe the file came from somewhere else that has a different terminator.
What do you mean by line terminator @bigown?
– Van Ribeiro
See in the edition if improved.
– Maniero
Now it worked... I used git config core.autocrlf input and the warning stopped coming... Thank you so much!
– Van Ribeiro
Yes, quite a lot... ^_^
– Van Ribeiro
and as to the
safecrlf
andeol
?– Bernardo Dal Corno
@Bernardoa.Dalcorno what you have?
– Maniero
@Maniero I saw a people commenting that
safecrl=false
would be better thanautocrlf
(I mean, will it change the files without worrying? ). And I didn’t quite understand the relationship ofeol
with these two reading the documentation– Bernardo Dal Corno
Can someone explain to me what this command does and why it solves the problem ? Command: git config core.autocrlf input input
– Gabriel Silva