As a repo creator/admin I want to ensure that people working on both Windows and Linux won't have problems with line endings (CRLF vs LF). I've read that .gitattributes is a good way to do that. I've also read that I need to commit to my repo just like any other file at its root.
But since it's apparently just like any other file do I need to commit it to every branch? Do I need to watch out for this while creating branches (and possibly some other actions)?
I've really tried googling for that but just couldn't find anything.
.gitattributesisn't "on a branch" or even "in a branch": it's in commits. The branch names move and even get deleted; it's the commits that are the solid parts of a repository, and hence the commits that matter. Note that Git automatically de-duplicates otherwise-duplicated files in commits, so if the.gitattributescontents in ten thousand commits never changes, there's really only the one underlying copy, being shared by all the commits..gitattributesfile needs to go into every commit..gitattributesearly on, after which it's just automatically in every new commit..gitattributesis included in every commit.