“在rush/admin.py 中,LF 将被 CRLF 替换”使用 git 暂存时出错
可能的重复:
git 用 CRLF 替换 LF
我有一个 Django 项目,我想合作和工作和我的团队一起做这件事。我对 git 很陌生,想知道如何设置它。
我已经 cd 进入项目目录并执行了“git init”,
但是当我尝试使用“git add .”暂存它时,它给出了错误“LF 将在rush/admin.py 中被 CRLF 替换”。我应该做什么以及我如何继续前进。请帮忙。
谢谢。
Possible Duplicate:
git replacing LF with CRLF
I have a Django project which I would like to collaborate and work on it with my team. I am very new to git and would like to know how to set it up.
I have cd into the project directory and did 'git init'
but when I try staging it with 'git add .', it gives an error 'LF would be replaced by CRLF in crush/admin.py'. What should and I do about it and how do I move forward. Please help.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您收到的具体错误是因为您的行结尾不统一;当您在系统之间切换时,通常会发生这种情况(Windows 和 Linux 使用不同的行结尾)。如果您对此感兴趣,您可以阅读维基百科条目,其中还包括有关制作确保您的条目是统一的。实际上你可以继续这样做,git 将确保你的所有文件都具有相同的换行符组合。
就熟悉 git 而言,这两个链接应该可以满足您所需的一切:
The specific error you are getting is because your line endings are not uniform; this usually happens when you shift between systems (Windows and Linux use different line endings). If you are interested in this, you can read the wikipedia entry, which also includes options on making sure your entries are uniform. You can actually go ahead with it and git will make sure all your files have the same newline character combination.
As far as familiarity with git, these two links should give you all you need: