当我在Windows上克隆一个使用msysgit使用LF行结束的存储库时,签出的文件有一些CRLF行结束,即使我的core.autocrlf
被设置为false
。为什么会这样呢?
示例:
> git config core.autocrlf
false
> git clone https://github.com/wp-cli/wp-cli.git wp-cli
签出的文件有CRLF行尾,即使它们在存储库本身中有LF。
发布于 2014-11-13 05:23:31
项目中有一个.gitattributes文件
# Auto detect text files and perform EOL normalization
* text=auto
这比core.autocrlf具有更高的优先级。
发布于 2014-11-13 05:23:23
.gitattributes
和wp存储库中的有这样的档案也会影响到这一点.
https://stackoverflow.com/questions/26909803
复制