zoukankan      html  css  js  c++  java
  • Git报错warning: LF will be replaced by CRLF

    Ruby命令

    1 $ git init 
    2 $ git add . 

    系统出现如下错误:warning: LF will be replaced by CRLF

    原因分析:
    CRLF -- Carriage-Return Line-Feed 回车换行
    就是回车(CR, ASCII 13, ) 换行(LF, ASCII 10, )。
    这两个ACSII字符不会在屏幕有任何输出,但在Windows中广泛使用来标识一行的结束。而在Linux/UNIX系统中只有换行符。
    也就是说在windows中的换行符为 CRLF, 而在linux下的换行符为:LF
    使用git来生成一个rails工程后,文件中的换行符为LF, 当执行git add .时,系统提示:LF 将被转换成 CRLF

    解决方法:

    删除刚刚生成的.git文件


    Ruby命令 

    1 $ rm -rf .git 
    2 $ git config --global core.autocrlf false 

    这样系统就不会去进行换行符的转换了

    最后重新执行


    Ruby命令

    1 $ git init 
    2 $ git add . 


    系统即可正常运行!

  • 相关阅读:
    python10.31
    python10.29
    python10.28
    python10.27
    python10.25
    python10.24
    python10.23
    四边形不等式与决策单调
    0x57~0x59
    0x55~0x56
  • 原文地址:https://www.cnblogs.com/yuanwanli/p/8526630.html
Copyright © 2011-2022 走看看