【问题标题】:How to find the CRLF line separator in the code如何在代码中找到 CRLF 行分隔符
【发布时间】:2015-01-11 23:12:04
【问题描述】:

当 PyCharm 向我显示此错误时,我正在提交文件。

You are about to commit CRLF line separators to the Git repository

这个行分隔符是什么?我的代码中有一些奇怪的字符吗?如何查找和管理它?

【问题讨论】:

  • 回车,换行由 Windows 使用。您的 repo/git 设置必须执行标准。 PyCharm 可以改变你的行尾,你可以设置一个默认值。
  • 所以你建议点击“Fix and Commit”,意思是git config --global core.autocrlf input will be called。但后果是什么?这种变化也会影响我的同事?

标签: git newline


【解决方案1】:

你可以使用命令找到分隔符:

git grep -Il $'\r'

【讨论】:

    猜你喜欢
    • 2019-09-08
    • 1970-01-01
    • 1970-01-01
    • 2021-02-20
    • 1970-01-01
    • 2013-06-20
    • 2021-10-06
    • 1970-01-01
    • 2016-07-12
    相关资源
    最近更新 更多