Somebody in my team has checked in a file with MS-DOS line endings into the git repo. with vi's binary mode, vi -b hello.py
, i can see lines ending with ctrl character - ^M
.
In emacs, whitespace-mode, the same characters are shown with $
sign. I infer, emacs has changed ^M
/$
chars uniformly to $
chars.
How can i restrict emacs from converting windows line feed into unix line feed and rather show the line feed chars - ^M
in its original form and not as $
?
I am trying to figure out, if git local repo can be configured to do this windows to unix line feed mapping, rather than emacs doing it.
DOS
label. Do you see it? You can easily convert entire file into Unix EOL style withC-x RET f
orM-x set-buffer-file-coding-system
. Git can be scripted to perform such conversion automatically too, but this requires additional efforts. See here for example.