git showing ^M in diff/show and how to stop it

in «tip» by Michael Beard
Tags: , , , ,

It appears that due to Windows and Mac machines in the same repo can cause this.

A solution appears to be at ignore ^M in git - Ryan Lundy's answer was, to me, the best.

Run the following at the command-line:

git config --global core.whitespace cr-at-eol

If you don't want it globally, then leave off the --global and then it does fine.