OpenCart 的 .gitignore

适用于 OpenCart 的 14 条忽略规则,可直接复制到您的仓库。

电商平台

OpenCart 的完整 .gitignore

# 由 LFGitignore - https://lfgitignore.com 生成
# 创建:2026-10-31 23:00:40 UTC
# 技术:OpenCart

### OpenCart ###
.htaccess
/config.php
admin/config.php
!index.html
download/
image/data/
image/cache/
system/cache/
system/logs/
system/storage/
vqmod/logs/*
vqmod/vqcache/*
vqmod/checked.cache
vqmod/mods.cache

这些 OpenCart 规则实际上忽略了什么

以下列出了每个忽略模式及其加入 .gitignore 的原因。

通用

模式 忽略的内容
.htaccess 通用
/config.php 通用
admin/config.php 通用
!index.html 通用
download/ 通用
image/data/ 通用
image/cache/ 通用
system/cache/ 通用
system/logs/ 通用
system/storage/ 通用
vqmod/logs/* vQmod 日志文件
vqmod/vqcache/* vQmod 缓存文件
vqmod/checked.cache 通用
vqmod/mods.cache 通用

如何将此 .gitignore 用于 OpenCart

  1. 复制上面的OpenCart规则,或者直接下载文件。
  2. 在 Git 仓库根目录创建名为 .gitignore 的文件,并将规则粘贴进去。
  3. 如果其中一些文件已被跟踪,请运行 git rm -r --cached . 然后再次提交 - Git 仅将忽略规则应用于未跟踪的文件。
  4. 提交 .gitignore 以便团队中的每个人都共享相同的规则。

其他 电子商务 .gitignore 模板

查看每个 电子商务 模板