Prevent CRLF conversion in a specific folder

I configured GIT to automatically handle newline character conversion between Linux and Windows. But in my project there is a specific folder in which I want GitHub to leave the newline characters as they are (Linux style).

So, I created a .gitattributes file in this folder and placed this line inside:

*.txt -crlf

I clicked on Linux, pulled out Windows, but Windows still has Windows-style newline characters.

I also tried:

*.txt -text
*.txt binary
*.txt eol=lf

does not work.

What should I do?

+4
source share
1 answer

This is the .gitattributes line you want:

*.txt text eol=lf

/: http://git-scm.com/docs/gitattributes.html

, kostix, , .

0

Source: https://habr.com/ru/post/1542455/


All Articles