背景介绍:
IDE工具为IDEA,之前用windows电脑提交代码,同事使用的也是windows电脑。放假时用家里的Mac修改代码后提交就报下面的错误提示:
使用IDEA提交代码时提示You are about to commit CRLF line separators to the Git repository

原因分析:
简单来说就是不同操作系统的换行符不一样,具体参考下面:
LF -UNIX或macOS使用,换行符 \n
CR -Classic macOS使用,换行符 \r
CRLF -Windows使用,换行符 \r\n

解决方法:
点击idea右下角的LF改为CRLF即可
使用IDEA提交代码时提示You are about to commit CRLF line separators to the Git repository

相关文章:

  • 2021-04-07
  • 2021-08-21
  • 2022-01-06
  • 2021-11-11
  • 2021-06-03
  • 2021-10-29
  • 2022-12-23
  • 2021-05-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-10
  • 2021-08-11
  • 2022-12-23
  • 2021-11-09
  • 2022-12-23
相关资源
相似解决方案