Skip to content

Commit

Permalink
chore: set up consistent line endings for types of files
Browse files Browse the repository at this point in the history
  • Loading branch information
dustin-jw committed Oct 31, 2023
1 parent 280e596 commit de58a3a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit de58a3a

Please sign in to comment.