.gitignore för PrestaShop

135 ignoreringsregler för PrestaShop, redo att kopieras till ditt repo.

E-handelsplattform

Den kompletta .gitignore-filen för PrestaShop

# Genererad av LFGitignore - https://lfgitignore.com
# Skapad: 2026-10-13 16:30:15 UTC
# Tekniker: Prestashop

### Prestashop ###
/.htaccess
# Loggfil
*.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-beroenden
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/

Vad reglerna för PrestaShop faktiskt ignorerar

Alla mönster nedan och varför de hör hemma i din .gitignore.

Cache, temporära och personliga filer

Mönster Vad det ignorerar
/.htaccess Cache, temporära och personliga filer
*.log Loggfil

Cache

Mönster Vad det ignorerar
/cache/* Cache
!/cache/.htaccess Cache
!/cache/cachefs/index.php Cache
!/cache/deprecated.txt Cache
!/cache/index.php Cache
!/cache/purifier/index.php Cache
!/cache/push/activity Cache
!/cache/push/index.php Cache
!/cache/push/trends Cache
!/cache/sandbox/index.php Cache
!/cache/smarty/cache/index.php Cache
!/cache/smarty/compile/index.php Cache
!/cache/smarty/index.php Cache
!/cache/tcpdf/index.php Cache

Nedladdning

Mönster Vad det ignorerar
/download/* Nedladdning
!/download/.htaccess Nedladdning
!/download/index.php Nedladdning

Bilder

Mönster Vad det ignorerar
/img/* Bilder
!/img/.htaccess Bilder
!/img/index.php Bilder
!/img/404.gif Bilder
!/img/bg_500.png Bilder
!/img/bg_loader.png Bilder
!/img/favicon.ico Bilder
!/img/loader.gif Bilder
!/img/loadingAnimation.gif Bilder
!/img/logo.jpg Bilder
!/img/logo.png Bilder
!/img/logo_invoice.jpg Bilder
!/img/logo_stores.png Bilder
!/img/macFFBgHack.png Bilder
!/img/prestashop-avatar.png Bilder
!/img/prestashop@2x.png Bilder
!/img/preston-login-wink@2x.png Bilder
!/img/preston-login@2x.png Bilder
!/img/questionmark.png Bilder
!/img/genders/index.php Bilder
!/img/admin/index.php Bilder
!/img/c/index.php Bilder
!/img/cms/index.php Bilder
!/img/co/index.php Bilder
!/img/jquery-ui Bilder
!/img/l/index.php Bilder
!/img/m/index.php Bilder
!/img/os/index.php Bilder
!/img/p/index.php Bilder
!/img/s/index.php Bilder
!/img/scenes Bilder
!/img/st/index.php Bilder
!/img/su/index.php Bilder
!/img/t/index.php Bilder
!/img/tmp/index.php Bilder

Uppladdning

Mönster Vad det ignorerar
/upload/* Uppladdning
!/upload/.htaccess Uppladdning
/vendor/* Uppladdning
/docs/phpdoc-sf/ Uppladdning
/composer.lock Uppladdning
*.hot-update.js Uppladdning
*.hot-update.json Uppladdning
/admin-dev/autoupgrade/* Uppladdning
!/admin-dev/autoupgrade/index.php Uppladdning
!/admin-dev/autoupgrade/backup/index.php Uppladdning
/admin-dev/backups/* Uppladdning
!/admin-dev/backups/.htaccess Uppladdning
/admin-dev/import/* Uppladdning
!/admin-dev/import/.htaccess Uppladdning
!/admin-dev/import/index.php Uppladdning
/admin-dev/export/* Uppladdning
!/admin-dev/export/.htaccess Uppladdning
!/admin-dev/export/index.php Uppladdning

Nedladdade RTL-filer

Mönster Vad det ignorerar
/admin-dev/themes/default/css/bundle/default_rtl.css Nedladdade RTL-filer
/admin-dev/themes/default/css/bundle/shared_rtl.css Nedladdade RTL-filer
/admin-dev/themes/default/css/font_rtl.css Nedladdade RTL-filer
/admin-dev/themes/default/css/overrides_rtl.css Nedladdade RTL-filer
/admin-dev/themes/default/css/vendor/font-awesome/font-awesome_rtl.css Nedladdade RTL-filer
/admin-dev/themes/default/css/vendor/nv.d3_rtl.css Nedladdade RTL-filer
/admin-dev/themes/default/css/vendor/titatoggle-min_rtl.css Nedladdade RTL-filer
/admin-dev/themes/default/public/theme_rtl.css Nedladdade RTL-filer
/admin-dev/themes/new-theme/css/module/drop_rtl.css Nedladdade RTL-filer
/admin-dev/themes/new-theme/css/right-sidebar_rtl.css Nedladdade RTL-filer
themes/*/cache/* Nedladdade RTL-filer

Konfiguration

Mönster Vad det ignorerar
config/settings.inc.php Konfiguration
config/settings.old.php Konfiguration
config/xml/* Konfiguration
config/themes/* Konfiguration
!config/xml/themes/default.xml Konfiguration
themes/*/config/settings_*.json Konfiguration
app/config/parameters.old.yml Konfiguration
app/config/config.php Konfiguration

Teman, moduler och åsidosättningar

Mönster Vad det ignorerar
modules/* Teman, moduler och åsidosättningar
override/* Teman, moduler och åsidosättningar
themes/*/ Teman, moduler och åsidosättningar
!themes/classic Teman, moduler och åsidosättningar
!themes/_core Teman, moduler och åsidosättningar
!themes/_libraries Teman, moduler och åsidosättningar

Tredjepartsleverantörer och beroenden

Mönster Vad det ignorerar
bower_components/ Tredjepartsleverantörer och beroenden
node_modules/ Node.js-beroenden
composer.phar Tredjepartsleverantörer och beroenden
php-cs-fixer Tredjepartsleverantörer och beroenden
.grunt/* Tredjepartsleverantörer och beroenden

Översättningar och e-postmallar

Mönster Vad det ignorerar
translations/* Översättningar och e-postmallar
mails/* Översättningar och e-postmallar
!mails/themes/ Översättningar och e-postmallar
!mails/_partials/ Översättningar och e-postmallar
themes/default-bootstrap/lang/* Översättningar och e-postmallar
themes/default-bootstrap/modules/*/translations/*.php Översättningar och e-postmallar
themes/default-bootstrap/mails/* Översättningar och e-postmallar
!themes/default-bootstrap/mails/en/ Översättningar och e-postmallar
themes/default-bootstrap/modules/*/mails/* Översättningar och e-postmallar
!themes/default-bootstrap/modules/*/mails/en Översättningar och e-postmallar

ÖVRIGT

Mönster Vad det ignorerar
*sitemap.xml ÖVRIGT
/robots.txt ÖVRIGT

Symfony

Mönster Vad det ignorerar
/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

Så använder du denna .gitignore för PrestaShop

  1. Kopiera reglerna för PrestaShop ovan eller ladda ner filen direkt.
  2. Skapa en fil med namnet .gitignore i roten av ditt Git-repo och klistra in reglerna.
  3. Om några av filerna redan spåras, kör git rm -r --cached . och gör sedan en ny commit — Git tillämpar bara ignoreringsregler på ospårade filer.
  4. Checka in .gitignore så att alla i teamet delar samma regler.

Andra .gitignore-mallar för E-handel

Visa alla mallar för E-handel