There's also a third line-ending format, that was used on old Mac systems.
Windows: CR LF, Unix-like: LF, Old Mac: CR.
That means: files created by native windows editors will break lines almost correctly on the other two (they will just display (or hide) spurious weird characters at the end/beginning of each line).
Files created on the other two will not play well with windows, and likely with each other either.
Now, modern-ish editors should have autodetection, but that typically doesn't work if the file doesn't have end-of-line marker at the end of the file.
(having an EOL marker at EOF looks like having an empty line at the end of the file)
Specifically, version-revisioning systems are supposed to convert EOLs so that each checked-out work copies have canonical EOLs for their system (and server has server's EOLs), and that can break if there's no EOL at EOF. Or if there's any line with a wrong EOL, sometimes.