在我的 emacs 文件中不断出现的这些 ^M 是什么? [英] What are these ^M's that keep showing up in my files in emacs?
问题描述
所以我认为这可能与 textmate 有关,但我们在一个小团队中工作,并且在 git 中几乎相同文件的全文件冲突方面存在一些问题,因为一个分支的每一行都附加了一个 ^M.
So 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 because each line of one branch has a ^M appended to it.
这个神秘的 ^M
字符应该做什么,它可能来自哪里?
What is this mysterious ^M
character supposed to do, and where could it be coming from?
我们的开发人员在 Windows/Mac 上使用 emacs,在 Mac 上使用 TextMate,在 Mac 上使用 coda,偶尔使用 wp-admin 文本编辑器.
Our developers use emacs on Windows/Mac, TextMate on Mac, coda on Mac, and occasionally the wp-admin text editor.
有人遇到过由其中之一引起的问题吗?
Anybody ever have this issue stemming from one of those?
推荐答案
在 git-config,将 core.autocrlf
设置为 true
以使 git 自动为您的平台正确转换行尾,例如为全局设置运行此命令:
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
这篇关于在我的 emacs 文件中不断出现的这些 ^M 是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!