I am getting the following message in Visual Studio 2008:
The line endings in the following file are not consistent. Do you want to normalize the line endings?
I don't understand what that means. Should I be clicking yes or no?
Whereas Windows follows the original convention of a carriage return plus a line feed ( CRLF ) for line endings, operating systems like Linux and Mac use only the line feed ( LF ) character. The history of these two control characters dates back to the era of the typewriter.
This is a good default option. text eol=crlf Git will always convert line endings to CRLF on checkout. You should use this for files that must keep CRLF endings, even on OSX or Linux. text eol=lf Git will always convert line endings to LF on checkout.
End of Line (EOL) or line ending is some special character that indicates text editors to show a new line for text files. • Most typical EOL: • LF (line feed) – Unix and Unix-like systems (Linux, MacOS…etc.)
use a text editor like notepad++ that can help you with understanding the line ends. It will show you the line end formats used as either Unix(LF) or Macintosh(CR) or Windows(CR LF) on the task bar of the tool. you can also go to View->Show Symbol->Show End Of Line to display the line ends as LF/ CR LF/CR.
The correct answer is almost always "Yes" and "Windows (CR LF)". The reason is that line endings in source files should almost always be consistent within the file and source files on Windows should generally have CR LF endings. There are exceptions but if if they applied to you, you would probably know about them. The warning is a good one because it informs you that somehow the file got into this inconsistent state and because it gives you a choice for how to handle the situation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With