How can I setup git to checkout some files crlf, others lf?
-
29-09-2019 - |
Question
I have a git repository which contains (among others) *.wse
text files and *.sh
text files. How can I setup git to always checkout *.wse
files with CRLF
line endings and *.sh
files with LF
line endings?
Solution
Use a gitattributes file to specify e.g.
*.wse eol=crlf
*.sh eol=lf
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow