From de58a3a410a2f1cc8de3c206cd9209f79c9627ce Mon Sep 17 00:00:00 2001 From: dustin-jw Date: Tue, 31 Oct 2023 11:51:35 -0600 Subject: [PATCH] chore: set up consistent line endings for types of files --- .gitattributes | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7b86682 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,22 @@ +# https://www.git-scm.com/docs/gitattributes + +# 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 + +# Set specific extensions manually as binary. +# https://www.git-scm.com/docs/gitattributes#_marking_files_as_binary +*.data -diff + +# Configure non-standard file extensions. Set as text to allow for line ending +# conversion to LF, diff type for Git, and syntax highlighting language for GitHub. +# https://github.com/github-linguist/linguist/blob/master/docs/overrides.md +*.module text diff=php linguist-language=php +*.rs.example text diff=rust linguist-language=rust + +# Windows-specific extensions that require CRLF line endings +*.{cmd,[cC][mM][dD]} text eol=crlf +*.{bat,[bB][aA][tT]} text eol=crlf