gitgitattributescore.autocrlf

How to express core.autocrlf = false with .gitattributes?


This is amazing. With a gazillion posts on the Internet about core.autocrlf and .gitattributes I am still unable to figure out what to write in .gitattributes to express core.autocrlf = false

Can anyone clear the mist around it? I do not need all the fancy cases, just give me core.autocrlf = false in .gitattributes. Nothing more, but nothing less.


Solution

  • If you don't want line ending conversion on a file, set the -text attribute. To turn off conversion on all files, set:

    * -text

    Note that this doesn't mean "this file isn't text" - that would be the binary attribute - it means "don't do text manipulations (line ending changes) on it".