From 5f04f5f8ddada05d2fa50e2c19265f680702457a Mon Sep 17 00:00:00 2001 From: Robin Munn Date: Fri, 8 Dec 2017 16:46:57 +0700 Subject: [PATCH] Force Unix line endings for text files (only) This should prevent binary files like .gz from being touched by the LF endofline conversion. --- .gitattributes | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.gitattributes b/.gitattributes index 9945adf460..91643d949a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,17 +2,24 @@ # Explicitly declare text files you want to always be normalized and converted # to native line endings on checkout. -*.css text -*.js text -*.json text -*.html text -*.php text -*.cs text # Declare files that will always have LF line endings on checkout. +*.css text eol=lf +*.js text eol=lf +*.json text eol=lf +*.html text eol=lf +*.php text eol=lf +*.cs text eol=lf *.sh text eol=lf protractor text eol=lf # Denote all files that are truly binary and should not be modified *.png binary *.jpg binary +*.gif binary +*.otf binary +*.ttf binary +*.woff binary +*.woff2 binary +*.7z binary +*.gz binary