From 6caaf8a92018f990c58611b609e50b78e541bb79 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Sun, 15 Oct 2023 18:55:01 +0300 Subject: [PATCH] .gitattributes: add suggestions for gitconfig --- .gitattributes | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.gitattributes b/.gitattributes index 4a57c426..1785b1af 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,6 +2,17 @@ # languages. For more information: `man gitattributes` * text=auto eol=lf linguist-detectable +# Suggestions for inevitably encountering .gitattributeless repositories when +# .gitattributes cannot be added: +# git config --global core.autocrlf input +# - `* text=auto` when there is no `.gitattributes`. In other words, +# commit eol=lf, check-out as it is. +# git config --global core.safecrlf warn +# - Warn if EOL change is irreversible. +# git config --global merge.renormalize true +# - Avoid merge-conflict when merging from .gitattributeless branch to +# .gitattributed branch + # Built-in diff patterns (disabled by default). The attribute `diff` implies # `text` and the above attributes are inherited. # https://www.git-scm.com/docs/gitattributes#_defining_a_custom_hunk_header