Am 19.07.24 um 23:43 schrieb James Larrowe:
> When changing a few lines in a file that already previously had CRLF
> line endings, the diff shows carriage returns being added at the end of
> the line. This results in a confusing situation where it appears that
> you are changing the line endings when in reality you are not.
First check whether you have core.whitespace set:
git config core.whitespace
If not, set it to this:
git config core.whitespace trailing-space,space-before-tab,cr-at-eol
If you have it set already, change the setting to include cr-at-eol.
With this setting, the CR (^M) is not treated as trailing whitespace
anymore, but as part of the line terminator.
Please report back if this solved your problem.
-- Hannes