-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitattributes
39 lines (36 loc) · 1.18 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
33
34
35
36
37
38
39
# Git normalization
# @see https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
# @see https://git-scm.com/docs/git-config#git-config-corewhitespace
# We will assign some macros for simplicity to:
# - 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]usual text eol=lf whitespace=blank-at-eol,-blank-at-eof,tab-in-indent,tabwidth=4
[attr]unusual text eol=lf whitespace=blank-at-eol,-blank-at-eof,tab-in-indent,tabwidth=2
# Set all text files with defined macro rules
*.dist usual
*.config usual
*.inc usual diff=php
*.js usual
*.json usual
*.lock usual
*.map usual
*.md usual
*.php usual diff=php
*.po usual
*.profile usual diff=php
*.script usual
*.sh usual diff=php
*.sql usual
*.txt usual
*.xml usual
*.yml unusual
*.yml.dist unusual
*.feature usual
# Set binary files to not diff.
*.gz binary
*.phar binary