What are these ^M's that keep showing up in my files in emacs? Ask Question

What are these ^M's that keep showing up in my files in emacs? Ask Question

I think it may have to do with TextMate, but we work in a small team and are having some issues with full-file conflicts of nearly identical files in git – in one branch the files have a ^M appended to each line.

What is this mysterious ^M character supposed to do, and where could it be coming from?

Our developers use emacs on Windows/Mac, TextMate on Mac, coda on Mac, and occasionally the wp-admin text editor.

Did anybody ever have this issue stemming from one of those?

ベストアンサー1

In git-config, set core.autocrlf to true to make git automatically convert line endings correctly for your platform, e.g. run this command for a global setting:

git config --global core.autocrlf true

おすすめ記事