summaryrefslogtreecommitdiffstats
path: root/.gitattributes
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2024-08-13 08:09:46 -0700
committerGitHub <noreply@github.com>2024-08-13 08:09:46 -0700
commit1124407b1345706d8b01dd23cd9e44696369a296 (patch)
tree7c1c9aa0922356eb841777d98b83e15b6c9ebc7c /.gitattributes
parentbbef25cbc668d42203eee493aa5737490124dfd2 (diff)
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 <yonghe@outlook.com>
Diffstat (limited to '.gitattributes')
-rw-r--r--.gitattributes3
1 files changed, 3 insertions, 0 deletions
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