zoukankan      html  css  js  c++  java
  • GIT 提交^M 文件所有行都被修改

    $ git config --global core.autocrlf true
    

    Of course, this is said to convert crlf to lf, while you want to convert cr to lf. I hope this still works …

    And then convert your files:

    # Remove everything from the index
    $ git rm --cached -r .
    
    # Re-add all the deleted files to the index
    # You should get lots of messages like: "warning: CRLF will be replaced by LF in <file>."
    $ git diff --cached --name-only -z | xargs -0 git add
    
    # Commit
    $ git commit -m "Fix CRLF"
    

    from:

    https://stackoverflow.com/questions/1889559/git-diff-to-ignore-m

    踩坑之路多回顾,不要在一个坑掉两次! THINK TWICE,CODE ONCE!
  • 相关阅读:
    超赞!不容错过的5款实用网页开发和设计工具
    如何从平面设计转行到UI设计?
    线段树
    RMQ
    Splay
    Treap
    *模板--矩阵
    最小生成树
    hash
    ac自动机
  • 原文地址:https://www.cnblogs.com/zhishuai/p/15716044.html
Copyright © 2011-2022 走看看