使用Linux和Windows时,最好的git配置是什么?

前端之家收集整理的这篇文章主要介绍了使用Linux和Windows时,最好的git配置是什么?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

我对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更改的一些文件.
有关详细信息,请参见this answer.

原文链接:https://www.f2er.com/linux/440244.html

猜你在找的Linux相关文章