# 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
# Declare files that will always have CRLF line endings on checkout.*.sln text eol=crlf
# Denote all files that are truly binary and should not be modified.*.png binary*.jpg binary
在我的一个项目的存储库中:
* text=auto
*.txt text eol=lf*.xml text eol=lf*.json text eol=lf*.properties text eol=lf*.conf text eol=lf
*.awk text eol=lf*.sed text eol=lf*.sh text eol=lf
*.png binary*.jpg binary
*.p12 binary