【发布时间】:2020-04-01 20:52:49
【问题描述】:
我想强制我的 repo 始终使用 windows 行尾,无论用户的环境或 core.autocrlf 的设置如何。我已经阅读了有关使用 .gitattributes 设置行尾的信息,但无法做到这一点。我的.gitattributes 文件如下所示:
* text=auto
* text eol=crlf
添加此文件后,我运行git add --renormalize . 和git add .gitattributes,然后推送到远程。但是,这并没有覆盖我的全局 core.autocrlf 设置。我想要的是将我的 windows 行尾推送到 Bitbucket,但我得到的是 Bitbucket 中的 linux 行尾。
无论用户对core.autocrlf 的设置如何,如何强制我的 git 客户端推送特定 repo 的 Windows 行尾?
【问题讨论】:
标签: git line-endings core.autocrlf