Why line endings matter
Windows and Unix-like systems commonly use different line-ending conventions. Git can normalize text files so a team does not see every line changed merely because a file moved between operating systems.
.gitattributes controls repository behavior
The .gitattributes file can define text normalization, binary handling, diff behavior and merge behavior for selected paths.
Be deliberate with binary files
Images and other binary assets should not be treated as ordinary text. Correct attributes reduce accidental conversions and make diffs more meaningful.