From 1124407b1345706d8b01dd23cd9e44696369a296 Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Tue, 13 Aug 2024 08:09:46 -0700 Subject: Do not add carrage return to shell scripts (#4811) This commit prevents GIT from adding carrage return characters to shell script files whose file extension is ".sh". Currently git automatically adds a carrage return characters to all lines in text files, which makes them Windows text file. This causes a trouble when a shell script is submitted and it is ran on WSL, because bash on WSL expects the script files in a unix text file format. Co-authored-by: Yong He --- .gitattributes | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitattributes b/.gitattributes index 0d697f0b7..73d82c13e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,5 @@ # indicate generated files so they don't appear in GitHub diffs *.slang.cpp linguist-generated + +# Set the line endings to LF for shell scripts +*.sh text eol=lf -- cgit v1.2.3