-
Notifications
You must be signed in to change notification settings - Fork 39
/
.gitattributes
32 lines (27 loc) · 1 KB
/
.gitattributes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# git normalization file
# @see http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
# Shorthand for text files.
# - Treat them as text.
# - Ensure no CRLF line-endings, neither on checkout nor on checkin.
# - Detect whitespace errors.
# - Exposed by default in `git diff --color` on the CLI.
# - Validate with `git diff --check`.
# - Deny applying with `git apply --whitespace=error-all`.
# - Fix automatically with `git apply --whitespace=fix`.
[attr]text text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=4
# Shorthand for binary files.
# - Do not treat them as text.
# - Include binary diff in patches instead of "binary files differ."
[attr]binary -text diff
# Auto-detect text files, ensure they use LF.
* text=auto eol=lf
# Define text file attributes.
*.py text diff=python
*.php text diff=php
# Define binary file attributes.
*.gif binary
*.gz binary
*.ico binary
*.jpg binary
*.png binary
*.phar binary