问题:
Possible Duplicate: 可能重复:
git replacing LF with CRLF git用CRLF替换LF
When I create a new rails application I'm seeing a warning in git about LF replacement. 当我创建一个新的Rails应用程序时,我在git中看到有关LF替换的警告。 I do git init git add . 我做git init git add。
and then boom! 然后繁荣! I see this pop up for almost all files. 我看到几乎所有文件都会弹出。 I usually just keep going and build my application and it disappears after many changes to files. 我通常只是继续构建我的应用程序,在对文件进行许多更改后它消失了。
Example: 例:
The file will have its original line endings in your working directory. 该文件将在您的工作目录中具有其原始行结尾。 warning: LF will be replaced by CRLF in Gemfile. 警告:在Gemfile中,LF将被CRLF替换。
The file will have its original line endings in your working directory. 该文件将在您的工作目录中具有其原始行结尾。 warning: LF will be replaced by CRLF in Gemfile.lock. 警告:LF将被Gemfile.lock中的CRLF替换。
The file will have its original line endings in your working directory. 该文件将在您的工作目录中具有其原始行结尾。 warning: LF will be replaced by CRLF in README. 警告:README中的LF将被CRLF替换。
What's the difference between LF and CRLF? LF和CRLF有什么区别?
Should I be concerned about this in the long run or just ignore it and keep going as I usually do? 从长远来看,我应该担心这个问题还是只是忽略它并像往常一样继续前进?
解决方案:
参考一: https://stackoom.com/question/OTh0/LF将由git中的CRLF替换-那是什么-它很重要吗-重复参考二: https://oldbug.net/q/OTh0/LF-will-be-replaced-by-CRLF-in-git-What-is-that-and-is-it-important-duplicate
来源:oschina
链接:https://my.oschina.net/u/3797416/blog/4311406