Skip to content

re: 🙏 Please Add .gitattributes To Your Git Repository VIEW POST


I think that for the use case you presented the git core.autocrlf config option is more appropriate.
With this option each developer can work with their native eol character.

However what I like about your option is that you can commit the gitattribute file and force the change for every developers


You're not really forcing it if you need to ask everyone to flush their cache / reset gitattributes.
If you need cooperation, it's better to just ask developers to set their autocrlf setting properly.
Prettier issue aside, it's better to preempt accidental commits of eol changes anyway.

code of conduct - report abuse