git status shows modifications even with autocrlf=false

后端 未结 6 1616
终归单人心
终归单人心 2020-11-30 03:21

I\'m experiencing the same issues as in this question: git status shows modifications, git checkout -- doesn't remove them

Git continues to show wor

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-30 03:47

    This problem can be caused by gitattributes' text option.

    Please read the documentation carefully but essentially autocrlf only matters if text is not set in a .gitattributes:

    Unspecified
    If the text attribute is unspecified, git uses the core.autocrlf configuration variable to determine if the file should be converted.

    Find your .gitattributes file via:

    find  -name .gitattributes
    

    And grep for text, eol or crlf to find your culprit and revise as necessary.

    You may just change this file and revert the change without committing for long enough to get through your issue.

提交回复
热议问题