Godot 的 .gitignore
适用于 Godot 的 11 条忽略规则,可直接复制到您的仓库。
开源游戏引擎
Godot 的完整 .gitignore
# 由 LFGitignore - https://lfgitignore.com 生成
# 创建:2026-10-31 21:54:07 UTC
# 技术:Godot
### Godot ###
.godot/
~*.dll
.nomedia
.import/
export.cfg
export_credentials.cfg
*.translation
# 临时文件
*.tmp
.mono/
data_*/
mono_crash.*.json
这些 Godot 规则实际上忽略了什么
以下列出了每个忽略模式及其加入 .gitignore 的原因。
Godot 4+ 特定忽略
| 模式 |
忽略的内容 |
.godot/ |
Godot 4+ 特定忽略 |
.nomedia |
Godot 4+ 特定忽略 |
Godot 4.2+ 特定忽略
| 模式 |
忽略的内容 |
~*.dll |
Godot 4.2+ 特定忽略 |
Godot 特定的忽略
| 模式 |
忽略的内容 |
.import/ |
Godot 特定的忽略 |
export.cfg |
Godot 特定的忽略 |
export_credentials.cfg |
Godot 特定的忽略 |
*.tmp |
临时文件 |
导入的翻译(从 CSV 文件自动生成)
| 模式 |
忽略的内容 |
*.translation |
导入的翻译(从 CSV 文件自动生成) |
单声道特定忽略
| 模式 |
忽略的内容 |
.mono/ |
单声道特定忽略 |
data_*/ |
单声道特定忽略 |
mono_crash.*.json |
单声道特定忽略 |
如何将此 .gitignore 用于 Godot
- 复制上面的Godot规则,或者直接下载文件。
- 在 Git 仓库根目录创建名为 .gitignore 的文件,并将规则粘贴进去。
- 如果其中一些文件已被跟踪,请运行 git rm -r --cached . 然后再次提交 - Git 仅将忽略规则应用于未跟踪的文件。
- 提交 .gitignore 以便团队中的每个人都共享相同的规则。