【发布时间】:2015-01-01 11:28:18
【问题描述】:
我已将我的 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 github phpstorm line-endings