-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy path.gitattributes
More file actions
67 lines (67 loc) · 2.24 KB
/
.gitattributes
File metadata and controls
67 lines (67 loc) · 2.24 KB
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
#####################################################################
# 1. 换行符标准化 (EOL Normalization)
# 确保所有文本文件在 Git 中以 LF 存储,签出时根据系统自动转换。
# 针对常见的文本文件类型
*.css text eol=lf
*.htm text eol=lf
*.html text eol=lf
*.js text eol=lf
*.json text eol=lf
*.md text eol=lf
*.markdown text eol=lf
*.py text eol=lf
*.sh text eol=lf
*.toml text eol=lf
*.txt text eol=lf
*.xml text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
# Hugo 配置和模板文件
*.go text eol=lf
*.tpl text eol=lf
*.scss text eol=lf
*.sass text eol=lf
.gitignore text eol=lf
.gitmodules text eol=lf
.editorconfig text eol=lf
# 确保所有剩余文件都由 Git 自动处理(默认行为,但明确列出更安全)
# 这是 Git 的默认设置,通常在 .git/config 中控制,但这里显式配置。
* text=auto
# -------------------------------------------------------------------
# 2. 标识为二进制文件
# 强制 Git 将这些文件视为二进制文件,避免对其进行 EOL 转换和 Diff 操作。
*.eot binary
*.gif binary
*.heic binary
*.ico binary
*.jpg binary
*.jpeg binary
*.mp3 binary
*.mp4 binary
*.ogg binary
*.otf binary
*.pdf binary
*.png binary
*.ttf binary
*.webp binary
*.woff binary
*.woff2 binary
# 矢量图像
*.svg text
# RC files (like .babelrc or .eslintrc)
*.*rc text
# Ignore files (like .npmignore or .gitignore)
*.*ignore text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
*.webp filter=lfs diff=lfs merge=lfs -text
*.svg filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.tar.gz filter=lfs diff=lfs merge=lfs -text
*.mp4 filter=lfs diff=lfs merge=lfs -text
*.mov filter=lfs diff=lfs merge=lfs -text
*.avi filter=lfs diff=lfs merge=lfs -text
*.avif filter=lfs diff=lfs merge=lfs -text
* !text !filter !merge !diff