如何设置git来检查一些文件crlf,其他人如何?

Tob*_*ias 2 git line-endings

我有一个git存储库,其中包含(以及其他)*.wse文本文件和*.sh文本文件.如何设置git以始终检查*.wseCRLF行结尾的*.sh文件和带LF行结尾的文件?

laa*_*lto 7

使用gitattributes文件指定例如

*.wse eol=crlf
*.sh eol=lf
Run Code Online (Sandbox Code Playgroud)