What does “!eol” in gitattributes do?

Git has 2 attributes that deal with end-of-lines: text Documentation says: This attribute enables and controls end-of-line normalization. When a text file is normalized, its line endings are converted to LF in the repository This effectively means that when you commit to the repo, it will convert line-endings to LF eol Documentation says: This attribute … Read more

Historical reason behind different line ending at different platforms

DOS inherited CR-LF line endings (what you’re calling \r\n, just making the ascii characters explicit) from CP/M. CP/M inherited it from the various DEC operating systems which influenced CP/M designer Gary Kildall. CR-LF was used so that the teletype machines would return the print head to the left margin (CR = carriage return), and then … Read more

How should I Fix “svn: Inconsistent line ending style”?

In my case, svn:eol-style property was set on a file. And “some lines of the file were separated by UNIX line endings (LF character), while others were separated by DOS-style line endings (CR+LF characters)”. Here is another detailed discussion of this problem. “Edit”->”EOL Conversion”->”Windows format” in Notepad++ solved the issue for me.

git line endings – can’t stash, reset and now can’t rebase over spurious line endings commit

Finally after 5 years here is a complete answer, thanks to Torsten Bögershausen. The way to debug this eol situation is to investigate using the –eol switch to git ls-files added by Torsten Bögershausen. Turns out that the file(s) in question were committed with CRLF while the .gitattributes file added later specified text for these … Read more

tech