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

Discover More
Git - Config

The git config command. The name is actually: the section and the key separated by a dot. The value will be escaped. Example: where: core.editor is the name whereas: core is the section...

Share this page:
Follow us:
Task Runner