Using .gitconfig in a collection

I’ve seen a use "\n" for line endings instead of "\r\n" error here.

I wonder if it’s a good idea to have a .gitconfig file in the repo that makes sure that EOLs are already \n and not \r\n? I think a .gitconfig in a repo can override global git config automatically so people don’t have to use this explicitly.

What would be the best way to implement this, and do other collections do this? Do you see any drawbacks to this approach?