Ludovic Frank Gitignore

.gitignore cho PrestaShop

135 quy tắc bỏ qua cho PrestaShop, sẵn sàng sao chép vào kho mã của bạn.

Nền tảng thương mại điện tử

Tệp .gitignore đầy đủ cho PrestaShop

# Được tạo bởi LFGitignore - https://lfgitignore.com
# Ngày tạo: 2026-10-31 21:54:59 UTC
# Công nghệ: Prestashop

### Prestashop ###
/.htaccess
# Tệp nhật ký
*.log
/cache/*
!/cache/.htaccess
!/cache/cachefs/index.php
!/cache/deprecated.txt
!/cache/index.php
!/cache/purifier/index.php
!/cache/push/activity
!/cache/push/index.php
!/cache/push/trends
!/cache/sandbox/index.php
!/cache/smarty/cache/index.php
!/cache/smarty/compile/index.php
!/cache/smarty/index.php
!/cache/tcpdf/index.php
/download/*
!/download/.htaccess
!/download/index.php
/img/*
!/img/.htaccess
!/img/index.php
!/img/404.gif
!/img/bg_500.png
!/img/bg_loader.png
!/img/favicon.ico
!/img/loader.gif
!/img/loadingAnimation.gif
!/img/logo.jpg
!/img/logo.png
!/img/logo_invoice.jpg
!/img/logo_stores.png
!/img/macFFBgHack.png
!/img/prestashop-avatar.png
!/img/prestashop@2x.png
!/img/preston-login-wink@2x.png
!/img/preston-login@2x.png
!/img/questionmark.png
!/img/genders/index.php
!/img/admin/index.php
!/img/c/index.php
!/img/cms/index.php
!/img/co/index.php
!/img/jquery-ui
!/img/l/index.php
!/img/m/index.php
!/img/os/index.php
!/img/p/index.php
!/img/s/index.php
!/img/scenes
!/img/st/index.php
!/img/su/index.php
!/img/t/index.php
!/img/tmp/index.php
/upload/*
!/upload/.htaccess
/vendor/*
/docs/phpdoc-sf/
/composer.lock
*.hot-update.js
*.hot-update.json
/admin-dev/autoupgrade/*
!/admin-dev/autoupgrade/index.php
!/admin-dev/autoupgrade/backup/index.php
/admin-dev/backups/*
!/admin-dev/backups/.htaccess
/admin-dev/import/*
!/admin-dev/import/.htaccess
!/admin-dev/import/index.php
/admin-dev/export/*
!/admin-dev/export/.htaccess
!/admin-dev/export/index.php
/admin-dev/themes/default/css/bundle/default_rtl.css
/admin-dev/themes/default/css/bundle/shared_rtl.css
/admin-dev/themes/default/css/font_rtl.css
/admin-dev/themes/default/css/overrides_rtl.css
/admin-dev/themes/default/css/vendor/font-awesome/font-awesome_rtl.css
/admin-dev/themes/default/css/vendor/nv.d3_rtl.css
/admin-dev/themes/default/css/vendor/titatoggle-min_rtl.css
/admin-dev/themes/default/public/theme_rtl.css
/admin-dev/themes/new-theme/css/module/drop_rtl.css
/admin-dev/themes/new-theme/css/right-sidebar_rtl.css
themes/*/cache/*
config/settings.inc.php
config/settings.old.php
config/xml/*
config/themes/*
!config/xml/themes/default.xml
themes/*/config/settings_*.json
app/config/parameters.old.yml
app/config/config.php
modules/*
override/*
themes/*/
!themes/classic
!themes/_core
!themes/_libraries
bower_components/
# Phụ thuộc Node.js
node_modules/
composer.phar
php-cs-fixer
.grunt/*
translations/*
mails/*
!mails/themes/
!mails/_partials/
themes/default-bootstrap/lang/*
themes/default-bootstrap/modules/*/translations/*.php
themes/default-bootstrap/mails/*
!themes/default-bootstrap/mails/en/
themes/default-bootstrap/modules/*/mails/*
!themes/default-bootstrap/modules/*/mails/en
*sitemap.xml
/robots.txt
/bin/
/app/Resources/geoip/GeoLite2-City.mmdb
/app/Resources/translations/*
!/app/Resources/translations/default
/app/config/parameters.yml
/app/config/parameters.php
/build/
/phpunit.xml
/var/*
!/var/cache
/var/cache/*
!var/cache/.gitkeep
!/var/logs
/var/logs/*
!var/logs/.gitkeep
!/var/sessions
/var/sessions/*
!var/sessions/.gitkeep
!var/SymfonyRequirements.php
/vendor/
/web/bundles/

Các quy tắc PrestaShop này thực sự bỏ qua những gì

Từng mẫu dưới đây và lý do nên thêm vào .gitignore.

Bộ nhớ đệm, tập tin tạm thời và cá nhân

Mẫu Nội dung được bỏ qua
/.htaccess Bộ nhớ đệm, tập tin tạm thời và cá nhân
*.log Tệp nhật ký

Bộ nhớ đệm

Mẫu Nội dung được bỏ qua
/cache/* Bộ nhớ đệm
!/cache/.htaccess Bộ nhớ đệm
!/cache/cachefs/index.php Bộ nhớ đệm
!/cache/deprecated.txt Bộ nhớ đệm
!/cache/index.php Bộ nhớ đệm
!/cache/purifier/index.php Bộ nhớ đệm
!/cache/push/activity Bộ nhớ đệm
!/cache/push/index.php Bộ nhớ đệm
!/cache/push/trends Bộ nhớ đệm
!/cache/sandbox/index.php Bộ nhớ đệm
!/cache/smarty/cache/index.php Bộ nhớ đệm
!/cache/smarty/compile/index.php Bộ nhớ đệm
!/cache/smarty/index.php Bộ nhớ đệm
!/cache/tcpdf/index.php Bộ nhớ đệm

Tải xuống

Mẫu Nội dung được bỏ qua
/download/* Tải xuống
!/download/.htaccess Tải xuống
!/download/index.php Tải xuống

Hình ảnh

Mẫu Nội dung được bỏ qua
/img/* Hình ảnh
!/img/.htaccess Hình ảnh
!/img/index.php Hình ảnh
!/img/404.gif Hình ảnh
!/img/bg_500.png Hình ảnh
!/img/bg_loader.png Hình ảnh
!/img/favicon.ico Hình ảnh
!/img/loader.gif Hình ảnh
!/img/loadingAnimation.gif Hình ảnh
!/img/logo.jpg Hình ảnh
!/img/logo.png Hình ảnh
!/img/logo_invoice.jpg Hình ảnh
!/img/logo_stores.png Hình ảnh
!/img/macFFBgHack.png Hình ảnh
!/img/prestashop-avatar.png Hình ảnh
!/img/prestashop@2x.png Hình ảnh
!/img/preston-login-wink@2x.png Hình ảnh
!/img/preston-login@2x.png Hình ảnh
!/img/questionmark.png Hình ảnh
!/img/genders/index.php Hình ảnh
!/img/admin/index.php Hình ảnh
!/img/c/index.php Hình ảnh
!/img/cms/index.php Hình ảnh
!/img/co/index.php Hình ảnh
!/img/jquery-ui Hình ảnh
!/img/l/index.php Hình ảnh
!/img/m/index.php Hình ảnh
!/img/os/index.php Hình ảnh
!/img/p/index.php Hình ảnh
!/img/s/index.php Hình ảnh
!/img/scenes Hình ảnh
!/img/st/index.php Hình ảnh
!/img/su/index.php Hình ảnh
!/img/t/index.php Hình ảnh
!/img/tmp/index.php Hình ảnh

Tải lên

Mẫu Nội dung được bỏ qua
/upload/* Tải lên
!/upload/.htaccess Tải lên
/vendor/* Tải lên
/docs/phpdoc-sf/ Tải lên
/composer.lock Tải lên
*.hot-update.js Tải lên
*.hot-update.json Tải lên
/admin-dev/autoupgrade/* Tải lên
!/admin-dev/autoupgrade/index.php Tải lên
!/admin-dev/autoupgrade/backup/index.php Tải lên
/admin-dev/backups/* Tải lên
!/admin-dev/backups/.htaccess Tải lên
/admin-dev/import/* Tải lên
!/admin-dev/import/.htaccess Tải lên
!/admin-dev/import/index.php Tải lên
/admin-dev/export/* Tải lên
!/admin-dev/export/.htaccess Tải lên
!/admin-dev/export/index.php Tải lên

Các tệp RTL đã tải xuống

Mẫu Nội dung được bỏ qua
/admin-dev/themes/default/css/bundle/default_rtl.css Các tệp RTL đã tải xuống
/admin-dev/themes/default/css/bundle/shared_rtl.css Các tệp RTL đã tải xuống
/admin-dev/themes/default/css/font_rtl.css Các tệp RTL đã tải xuống
/admin-dev/themes/default/css/overrides_rtl.css Các tệp RTL đã tải xuống
/admin-dev/themes/default/css/vendor/font-awesome/font-awesome_rtl.css Các tệp RTL đã tải xuống
/admin-dev/themes/default/css/vendor/nv.d3_rtl.css Các tệp RTL đã tải xuống
/admin-dev/themes/default/css/vendor/titatoggle-min_rtl.css Các tệp RTL đã tải xuống
/admin-dev/themes/default/public/theme_rtl.css Các tệp RTL đã tải xuống
/admin-dev/themes/new-theme/css/module/drop_rtl.css Các tệp RTL đã tải xuống
/admin-dev/themes/new-theme/css/right-sidebar_rtl.css Các tệp RTL đã tải xuống
themes/*/cache/* Các tệp RTL đã tải xuống

Cấu hình

Mẫu Nội dung được bỏ qua
config/settings.inc.php Cấu hình
config/settings.old.php Cấu hình
config/xml/* Cấu hình
config/themes/* Cấu hình
!config/xml/themes/default.xml Cấu hình
themes/*/config/settings_*.json Cấu hình
app/config/parameters.old.yml Cấu hình
app/config/config.php Cấu hình

Chủ đề, mô-đun và phần ghi đè

Mẫu Nội dung được bỏ qua
modules/* Chủ đề, mô-đun và phần ghi đè
override/* Chủ đề, mô-đun và phần ghi đè
themes/*/ Chủ đề, mô-đun và phần ghi đè
!themes/classic Chủ đề, mô-đun và phần ghi đè
!themes/_core Chủ đề, mô-đun và phần ghi đè
!themes/_libraries Chủ đề, mô-đun và phần ghi đè

Nhà cung cấp và phụ thuộc

Mẫu Nội dung được bỏ qua
bower_components/ Nhà cung cấp và phụ thuộc
node_modules/ Phụ thuộc Node.js
composer.phar Nhà cung cấp và phụ thuộc
php-cs-fixer Nhà cung cấp và phụ thuộc
.grunt/* Nhà cung cấp và phụ thuộc

Bản dịch và mẫu email

Mẫu Nội dung được bỏ qua
translations/* Bản dịch và mẫu email
mails/* Bản dịch và mẫu email
!mails/themes/ Bản dịch và mẫu email
!mails/_partials/ Bản dịch và mẫu email
themes/default-bootstrap/lang/* Bản dịch và mẫu email
themes/default-bootstrap/modules/*/translations/*.php Bản dịch và mẫu email
themes/default-bootstrap/mails/* Bản dịch và mẫu email
!themes/default-bootstrap/mails/en/ Bản dịch và mẫu email
themes/default-bootstrap/modules/*/mails/* Bản dịch và mẫu email
!themes/default-bootstrap/modules/*/mails/en Bản dịch và mẫu email

Khác

Mẫu Nội dung được bỏ qua
*sitemap.xml Khác
/robots.txt Khác

Symfony

Mẫu Nội dung được bỏ qua
/bin/ Symfony
/app/Resources/geoip/GeoLite2-City.mmdb Symfony
/app/Resources/translations/* Symfony
!/app/Resources/translations/default Symfony
/app/config/parameters.yml Symfony
/app/config/parameters.php Symfony
/build/ Symfony
/phpunit.xml Symfony
/var/* Symfony
!/var/cache Symfony
/var/cache/* Symfony
!var/cache/.gitkeep Symfony
!/var/logs Symfony
/var/logs/* Symfony
!var/logs/.gitkeep Symfony
!/var/sessions Symfony
/var/sessions/* Symfony
!var/sessions/.gitkeep Symfony
!var/SymfonyRequirements.php Symfony
/vendor/ Symfony
/web/bundles/ Symfony

Cách sử dụng .gitignore này cho PrestaShop

  1. Sao chép các quy tắc PrestaShop ở trên hoặc tải tệp trực tiếp.
  2. Tạo tệp có tên .gitignore ở thư mục gốc của kho mã Git và dán các quy tắc vào đó.
  3. Nếu Git đã theo dõi một số tệp này, hãy chạy git rm -r --cached . rồi commit lại — Git chỉ áp dụng quy tắc bỏ qua cho các tệp chưa được theo dõi.
  4. Commit tệp .gitignore để mọi người trong nhóm dùng chung các quy tắc.

Các mẫu .gitignore khác trong danh mục Thương mại điện tử

Xem mọi mẫu Thương mại điện tử