I've read Git documentation that shows that I can explicitly set certain files to be treated as text, so their line endings are automatically changed or as binary to ensure that they are untouched.
However, I have also read that Git is pretty good at detecting binary files, which makes me think this is not needed. So my question is do I really need to specify these explicit settings for every single file extension in my repository? I've seen some recommendations to do so for all image file extensions.
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.c text
*.h text
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
Thanks to all for the answers, I've written up a blog post: .gitattributes Best Practices.