From 9958a96c57fd652e2c68d6d07169c945d4c20f3d Mon Sep 17 00:00:00 2001 From: Wookey Date: Sat, 29 Apr 2023 23:51:04 +0100 Subject: [PATCH] Set repo to normalise linefeeds for text files to lf on checkin Should avoid mixed linefeeds in the repo. But uses local convention in checkouts. Details in: https://www.aleksandrhovhannisyan.com/blog/crlf-vs-lf-normalizing-line-endings-in-git/#all-line-ending-transformations-concern-the-index --- .gitattributes | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..5393d1536 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,9 @@ +#Try to avoid mixed linefeeds in our repo +# Set the default behavior, in case people don't have core.autocrlf set. +# (check out and in automatically according to OS) +* text=auto + +# Explicitly declare text files you want to always be normalized and converted +# to native line endings on checkout. +#*.html text +#*.htm text