How can I setup git to checkout some files crlf, others lf?
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?
- Git whitespace/line ending
- Cherry-pick with ignore whitespace / line-endings
- What is the easiest way to convert all files in git repo to LF line endings
- Kernel bash scripts compilation error
- How to fix the line endings in checked out files after changing the autoclrf setting for a git repository?
- Convert line-endings for whole directory tree (Git)
One Solution collect form web for “How can I setup git to checkout some files crlf, others lf?”
Use a gitattributes file to specify e.g.
*.wse eol=crlf *.sh eol=lf