使用Linux和Windows时,最好的git配置是什么?
发布时间:2020-12-14 02:07:02 所属栏目:Linux 来源:网络整理
导读:我对git config的core.eol,core.autocrlf,core.safecrlf有点困惑. http://git-scm.com/docs/git-config 我正在使用Ubuntu和Widows. 我之前有过^ M和其他问题. 谁能为这个问题建议最好的git配置设置? 提前致谢. 解决方法 如在 Git on Windows (msysgit) – U
我对git config的core.eol,core.autocrlf,core.safecrlf有点困惑.
http://git-scm.com/docs/git-config 我正在使用Ubuntu和Widows. 我之前有过^ M和其他问题. 谁能为这个问题建议最好的git配置设置? 提前致谢. 解决方法
如在
Git on Windows (msysgit) – Unix or DOS line termination详细说明,我会使用:
git config --system core.autocrlf false 这将避免任何自动eol转换(有关此选项值的确切含义,请参阅“Git on Windows: What do the crlf settings mean?”). 您可以将其保留为true,如git replacing LF with CRLF中所述,但我更喜欢将core.eol设置为一些gitattribute文件,以便微调我想要eol更改的一些文件. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |