-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitattributes
67 lines (55 loc) · 2.06 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# References (comments):
# - https://github.com/helstern/dotfiles/blob/develop/.gitattributes
# Default settings
# Handle line endings automatically for files detected as text and leave all files detected as binary untouched.
# Convert to OS-dependent EOL (LF for UNIX, CRLF for Windows), !eol means Git will use core.eol setting of .git/config
* text=auto !eol
# Override settings
# The default settings will handle all file patterns NOT found below
# Explicitly declare text files you always want normalized and converted to native line endings on checkout.
.gitattributes text
.gitignore text
vagrantfile text
# Explicitly declare files that will always have LF line endings on checkout.
# Example: *.sh text eol=lf
*.bash text eol=lf
*.sh text eol=lf
*.shar text eol=lf
*.php text eol=lf
# grammar files
*.gr text eol=lf
*.ebnf text eol=lf
*.yml text eol=lf
# Explicitly declare files that will always have CRLF line endings on checkout.
# Example: *.sln text eol=crlf
*.bat text eol=crlf
*.cmd text eol=crlf
# Explicitly denote all files that are truly binary and should not be modified.
# Example: *.png binary
*.phar -text binary
*.bmp -text binary
*.jpg -text binary
*.gif -text binary
*.png -text binary
*.doc -text binary
*.rtf -text binary
*.class -text binary
*.zip -text binary
*.jar -text binary
*.war -text binary
*.phar -text binary
bin/gcopy -text binary
bin/gdeebnf -text binary
bin/gdempty -text binary
bin/gsqueeze -text binary
bin/gstartfollow -text binary
bin/gstats -text binary
# After editting this .gitattributes file, you need to re-normalize all files that have the wrong line-endings:
# $ rm .git/index
# $ git reset
# $ git status # This lists all files that will be normalized
# $ git add -u
# $ git add .gitattributes
# $ git commit
# $ rm -rf * # Force Git to rewrite the working directory with correct line endings
# $ git reset --hard