我已经将我的PHPStorm行结尾设置为LF,但是当我提交
github时,有时我会看到一些文件再次出现在CRLF行结尾(我在
Windows上工作).
它发生在我编辑的相同文件中,没有人在我的提交/推送到存储库之间编辑它们.这非常烦人,我需要经常将行结尾更改为同一个文件.它可能是什么以及如何解决它?
我也检查了选项“如果要提交CRLF行分隔符就警告”
编辑
我的本地git配置是这样的:
[core] repositoryformatversion = 0 filemode = false bare = false logallrefupdates = true symlinks = false ignorecase = true hideDotFiles = dotGitOnly [remote "origin"] url = https://github.com/* fetch = +refs/heads/*:refs/remotes/origin/* [branch "develop"] remote = origin merge = refs/heads/develop
我的全局配置是这样的:
[user] name = * email = * [core] autocrlf = false
我的系统范围配置是这样的:
[core] symlinks = false autocrlf = false [color] diff = auto status = auto branch = auto interactive = true [pack] packSizeLimit = 2g [help] format = html [http] sslCAinfo = /bin/curl-ca-bundle.crt [sendemail] smtpserver = /bin/msmtp.exe [diff "astextplain"] textconv = astextplain [rebase] autosquash = true
我在PHPStorm中的GIT设置:
您可以检查此Git设置是否有帮助:
原文链接:https://www.f2er.com/php/132789.htmlgit config --global core.autocrlf false
我通常建议keeping core.autocrlf
to false(有only a few reason to set it to true).
还要检查是否有任何带有core.eol指令的.gitattributes文件.