From cfdc25335c1f7d9fcbeb3b731eaccc55476cba93 Mon Sep 17 00:00:00 2001 From: Slava <20563034+veaceslavdoina@users.noreply.github.com> Date: Sat, 5 Oct 2024 23:08:49 +0300 Subject: [PATCH] Add .gitattributes for line endings in .bat, .cmd and .sh scripts (#103) --- .gitattributes | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..aa2a4bd --- /dev/null +++ b/.gitattributes @@ -0,0 +1,10 @@ +# Set default behavior to automatically normalize line endings. +* text=auto + +# Force bash scripts to always use lf line endings so that if a repo is accessed +# in Unix via a file share from Windows, the scripts will work. +*.sh text eol=lf + +# Likewise, force cmd and batch scripts to always use crlf +*.cmd text eol=crlf +*.bat text eol=crlf