Git: Default all text files to unix line breaks

前端 未结 1 1121
误落风尘
误落风尘 2021-01-23 00:10

I know there is setting in .gitattributes to have

*.txt eol=lf

and there is also this to have all text files default to conversion:

<         


        
相关标签:
1条回答
  • 2021-01-23 00:57

    Try this

    * text=auto !eol
    

    and set core.eol=lf in .git/config.

    (the answer is edited, before I proposed one more option "* text=auto eol=lf" but it doesn't work for this case)

    0 讨论(0)
提交回复
热议问题