Dealing with files that Git refuses to reset?

末鹿安然 提交于 2019-11-29 07:41:41

The problem with this settings, as illustrated by the GitHub guide is an automatic conversion is done during the checkout of the repository...

That means you do not need to open a file to trigger any change.

Is it not possible to keep autocrlf to false, and open those Windows files in editors able to respect the return line characters?

Note (illustrated here), if you need the conversion, except for some files, you could add a .gitattributes in the parent directory, with a:

myFile -crlf

In the file you set attributes to a path (or a pattern), or unset them (with the minus sign).
The crlf attribute is the attribute which tells if a file is affected by the core.autocrlf options. If you unset it, Git won’t mess with the line endings in the file

To solve this problem on my Windows 7 machine using git 1.7.3.1, I had to set the core.filemode option to false.

git config -e --local
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!