Git - End Of Line


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


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



  • 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 .

Disable Conversion

git config --global core.autocrlf false

Powered by ComboStrap