-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy path.gitattributes
More file actions
52 lines (48 loc) · 1.39 KB
/
.gitattributes
File metadata and controls
52 lines (48 loc) · 1.39 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
###############################################
# 1. 默认所有文本文件使用 LF 换行符,禁止 CRLF
###############################################
* text eol=lf
###############################################
# 2. Unity 关键文本文件(绝不能被 Git 转码)
# —— 只控制换行符,不强制 encoding
# —— 否则会导致 Unity reimport、diff 混乱
###############################################
*.meta text eol=lf
*.mat text eol=lf
*.anim text eol=lf
*.prefab text eol=lf
*.unity text eol=lf
*.shader text eol=lf
*.cginc text eol=lf
*.compute text eol=lf
*.asmdef text eol=lf
*.json text eol=lf
*.xml text eol=lf
*.txt text eol=lf
*.md text eol=lf
###############################################
# 3. C# 文件强制 UTF-8(唯一安全可转码的类型)
# —— IDE 可能保存为 ANSI,因此必须强制
# —— 不会影响 Unity,不会 reimport
###############################################
*.cs text working-tree-encoding=UTF-8 eol=lf
###############################################
# 4. 二进制文件(防止被 diff / 转码)
###############################################
*.png binary
*.jpg binary
*.jpeg binary
*.exr binary
*.tga binary
*.psd binary
*.fbx binary
*.obj binary
*.dll binary
*.exe binary
*.zip binary
*.7z binary
*.gz binary
*.unitypackage binary
*.wav binary
*.ogg binary
*.mp3 binary