Git - End Of Line

1 - About

This page is talking about the EOL characters management in git.

3 - .gitattributes

In the .gitattributes file

  • One file

path/to/my/file eol=crlf

  • All files with .txt extension

*.txt -crlf

  • exclusion


  • If you want files you check in to be normalized

* text=auto
* text=auto eol=lf

4 - Management

4.1 - Default

  • All repo

git config --global core.eol lf

  • Current repo

git config core.eol crlf

After default modification, delete the stagin area

git rm --cached -rf .

4.2 - Disable Conversion

git config --global core.autocrlf false

Data Science
Data Analysis
Data Science
Linear Algebra Mathematics

Powered by ComboStrap