Ludovic Frank Gitignore

.gitignore สำหรับ PrestaShop

กฎการละเว้นสำหรับ PrestaShop จำนวน 135 ข้อ พร้อมคัดลอกไปใช้ในคลังโค้ดของคุณ

แพลตฟอร์มอีคอมเมิร์ซ

.gitignore ที่สมบูรณ์สำหรับ PrestaShop

# สร้างโดย LFGitignore - https://lfgitignore.com
# สร้าง: 2026-10-31 23:00:40 UTC
# เทคโนโลยี: Prestashop

### Prestashop ###
/.htaccess
# ไฟล์บันทึก
*.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/
# การพึ่งพา 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/

สิ่งที่กฎ PrestaShop เหล่านี้มองข้ามไปจริงๆ

ทุกรูปแบบด้านล่าง และทำไมมันถึงอยู่ใน .gitignore ของคุณ

แคช อุณหภูมิ และไฟล์ส่วนบุคคล

รูปแบบ สิ่งที่กฎนี้ละเว้น
/.htaccess แคช อุณหภูมิ และไฟล์ส่วนบุคคล
*.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 อัปโหลด

ดาวน์โหลดไฟล์ RTL

รูปแบบ สิ่งที่กฎนี้ละเว้น
/admin-dev/themes/default/css/bundle/default_rtl.css ดาวน์โหลดไฟล์ RTL
/admin-dev/themes/default/css/bundle/shared_rtl.css ดาวน์โหลดไฟล์ RTL
/admin-dev/themes/default/css/font_rtl.css ดาวน์โหลดไฟล์ RTL
/admin-dev/themes/default/css/overrides_rtl.css ดาวน์โหลดไฟล์ RTL
/admin-dev/themes/default/css/vendor/font-awesome/font-awesome_rtl.css ดาวน์โหลดไฟล์ RTL
/admin-dev/themes/default/css/vendor/nv.d3_rtl.css ดาวน์โหลดไฟล์ RTL
/admin-dev/themes/default/css/vendor/titatoggle-min_rtl.css ดาวน์โหลดไฟล์ RTL
/admin-dev/themes/default/public/theme_rtl.css ดาวน์โหลดไฟล์ RTL
/admin-dev/themes/new-theme/css/module/drop_rtl.css ดาวน์โหลดไฟล์ RTL
/admin-dev/themes/new-theme/css/right-sidebar_rtl.css ดาวน์โหลดไฟล์ RTL
themes/*/cache/* ดาวน์โหลดไฟล์ RTL

การกำหนดค่า

รูปแบบ สิ่งที่กฎนี้ละเว้น
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/ ผู้ขายและการพึ่งพา
node_modules/ การพึ่งพา Node.js
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 เบ็ดเตล็ด

Symfony

รูปแบบ สิ่งที่กฎนี้ละเว้น
/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

วิธีใช้ .gitignore นี้สำหรับ PrestaShop

  1. คัดลอกกฎ PrestaShop ด้านบน หรือดาวน์โหลดไฟล์โดยตรง
  2. สร้างไฟล์ชื่อ .gitignore ที่รากของที่เก็บ Git ของคุณ และวางกฎลงไป
  3. หาก Git ติดตามไฟล์เหล่านั้นอยู่แล้ว ให้เรียกใช้ git rm -r --cached . แล้วคอมมิตอีกครั้ง เพราะกฎการละเว้นของ Git มีผลเฉพาะกับไฟล์ที่ยังไม่ได้ติดตาม
  4. คอมมิตไฟล์ .gitignore เพื่อให้ทุกคนในทีมใช้กฎเดียวกัน

เทมเพลต อีคอมเมิร์ซ .gitignore อื่นๆ

ดูเทมเพลต อีคอมเมิร์ซ ทุกอัน