Github for windows在提交时改变行尾 [英] Github for windows changing line endings on commit
问题描述
在github for windows中,它在提交之前显示正确的更改,并且当提交的行结束被改变时,它显示一个差异。
这只会随机发生,但无法弄清楚它为什么会改变。 b
放到命令行而不是使用Github for windows。 MSysGit将更密切地遵循主git源代码的维护者为git实现的内容。
git config --system core .autocrlf false
git config --system core.whitespace cr-at-eol
Don不要让你的版本控制系统与你的行结尾混淆,除非它绝对必须。
I have a developer that's works with me and randomly his files get changed to CRLF line endings.
In github for windows it shows the correct change before commit, and when committed the line endings get changed and it shows a bad diff.
This only happens randomly, but cant figure out why it is changing.
Drop to the command line instead of using Github for windows. MSysGit will follow more closely what is implemented for git by the maintainers of the main git source code.
git config --system core.autocrlf false
git config --system core.whitespace cr-at-eol
Don't let your version control system mess with your line endings unless it absolutely has to.
这篇关于Github for windows在提交时改变行尾的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!