Disabling Git end-of-line normalization across all machines: autocrlf=false vs "* -text" in gitattributes?
As noted in many other posts, Git's end-of-line normalization has its pros and cons. I have one particular Windows-only project where I think the best thing to do is to is to disable end-of-line normalization altogether. That is, I want to leave all newlines (most of which are CRLF) intact, rather than have git normalize them to LF-only behind the scenes. The question is the most effective way to do it.

Most discussions are in terms of core.autocrlf, and I could accomplish my goal by setting core.autocrlf=false. However, this is a git-config setting, and I think I might need to set it separately machine by machine. If true, that seems error prone.

An alternative, suggested by "git help attributes", is to put "* -text" in the repo's .gitattributes file, and to have git track .gitattributes as a versioned file. That man page makes it *appear* that this will disable end-of-line normalization for all files without having other side-effects. But I'm wondering if there are any potential gotchas to this approach. (e.g. Could-text also impact how diffs or merges are performed?)

Disabling Git end-of-line normalization across all machines: autocrlf=false vs "* -text" in gitattributes?
===

As noted in many other posts, Git's end-of-line normalization has its pros and cons. I have one particular Windows-only project where I think the best thing to do is to is to disable end-of-line normalization altogether. That is, I want to leave all newlines (most of which are CRLF) intact, rather than have git normalize them to LF-only behind the scenes. The question is the most effective way to do it.

Most discussions are in terms of core.autocrlf, and I could accomplish my goal by setting core.autocrlf=false. However, this is a git-config setting, and I think I might need to set it separately machine by machine. If true, that seems error prone.

An alternative, suggested by "git help attributes", is to put "* -text" in the repo's .gitattributes file, and to have git track .gitattributes as a versioned file. That man page makes it *appear* that this will disable end-of-line normalization for all files without having other side-effects. But I'm wondering if there are any potential gotchas to this approach. (e.g. Could-text also impact how diffs or merges are performed?)
