Git status ignore line endings / identical files / windows & linux environment / dropbox / mled

后端 未结 6 1788
离开以前
离开以前 2020-12-02 07:42

How do I make

git status

ignore line ending differences?

Background info:

I use randomly Windows and Linux to w

6条回答
  •  伪装坚强ぢ
    2020-12-02 08:05

    Use .gitattributes instead, with the following setting:

    # Ignore all differences in line endings
    *        -crlf
    

    .gitattributes would be found in the same directory as your global .gitconfig. If .gitattributes doesn't exist, add it to that directory. After adding/changing .gitattributes you will have to do a hard reset of the repository in order to successfully apply the changes to existing files.

提交回复
热议问题