Line breaks in Visual STudio Code and Git (LF vs CRLF)

Background
In Windows a line break ends with the characters <CR><LF> and in Linux a line break is only a <LF>.
So usually line breaks in text files in Windows should be ending with <CR><LF> and in Linux they should end with <LF>. In mixed environments (Windows/Linux) this is something one has to take into account.

Visual Studio Code
In VS Code you easily see which line breaks are being used for a file. This can be seen at the right bottom of a file. It can be changed by clicking on it (LF or CRLF).

You can also change the default for new files in the settings with the “files.eol” property.

Git
Line breaks are also something in Git. You can influence the behaviour of it with the core.autocrlf property.
If you don’t want Git to change the line break settings you have to set “core.autocrlf” to false.
git config --global core.autocrlf false
See the Git documentation for other values.