【发布时间】:2012-09-02 15:43:16
【问题描述】:
根据this question,我了解 git 中的 core.autocrlf=true 会导致 CRLF 到 LF 的翻译。
但是当我输入: git config core.autocrlf
我明白了: 假的
但是,当我暂存已在 repo 中的已修改文件时,我仍然会收到以下警告:
Warning: CRLF will be replaced by LF in File1.X.
The file will have its original line endings in your working directory.
我的猜测是该文件的 repo 副本已设置为“autocrlf=true”。
问题:A. 我如何查询文件或 git repo 是否已经在强制 AutoCrlf? B. 如何关闭 autocrlf?
【问题讨论】:
-
我想知道您是否可以拥有您不检查源代码控制的 .gitattributes 文件的“本地”副本?我希望有一些 repos 是“windows 风格”设置,只有 1 个 repo 是 LINUX 风格,而不强制该 repo 的所有用户使用 LINUX。这可能吗?
-
你能加入一个只适用于本地特定目录(即 REPO)的 git 全局设置吗?我想要一些 repos 是 WINDOWS 和一些是 LINUX 风格的行尾?
标签: git core.autocrlf