Skip to content

Commit 67d6b07

Browse files
committed
chore: set up consistent line endings for types of files
1 parent 41b6400 commit 67d6b07

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.gitattributes

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# https://www.git-scm.com/docs/gitattributes
2+
3+
# Set default behavior to automatically normalize line endings.
4+
* text=auto
5+
6+
# Force bash scripts to always use LF line endings so that if a repo is accessed
7+
# in Unix via a file share from Windows, the scripts will work.
8+
*.sh text eol=lf
9+
10+
# Set specific extensions manually as binary.
11+
# https://www.git-scm.com/docs/gitattributes#_marking_files_as_binary
12+
*.data -diff
13+
14+
# Configure non-standard file extensions. Set as text to allow for line ending
15+
# conversion to LF, diff type for Git, and syntax highlighting language for GitHub.
16+
# https://github.com/github-linguist/linguist/blob/master/docs/overrides.md
17+
*.module text diff=php linguist-language=php
18+
*.rs.example text diff=rust linguist-language=rust
19+
20+
# Windows-specific extensions that require CRLF line endings
21+
*.{cmd,[cC][mM][dD]} text eol=crlf
22+
*.{bat,[bB][aA][tT]} text eol=crlf

0 commit comments

Comments
 (0)