Description

This is an edited version of the .gitignore found on the Prestashop github.

Doesn't exlude core.

Excludes contrib themes and modules. Includes /custom/ folder if applicable.

I also added some other files like text files, other common IDE files, archives and bins and others.

I left in the licenses.

Project files from the default Presta install, like the MakeFile, are not excluded. I deleted them personally.

Please remember to replace the admin folder name.

# Copy of the prestashop gitignore from github.
# The core is in git, but the contrib modules and themes are not.

# Cache, temp and personal files

/.htaccess
/.htpasswd
*.log
npm-debug.log.*
.sass-cache/
*.swp
*.swo
*.zip
.DS_Store
*.bak
.cache/
.vscode
XMLFeed.cache

# Cache
/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/*
!/download/.htaccess
!/download/index.php

# Default imports
docs/csv_import/*
!docs/csv_import/.htaccess
!docs/csv_import/index.php

# Images
/img/*
!/img/.htaccess
!/img/index.php
!/img/404.gif
!/img/app_icon.png
!/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/module/default.png
!/img/genders/index.php
!/img/admin/index.php
!/img/c/index.php
!/img/cms/index.php
!/img/co/index.php
!/img/e/index.php
!/img/jquery-ui
!/img/l/index.php
!/img/m/index.php
!/img/os/index.php
!/img/p/index.php
!/img/pr/index.php
!/img/pr/default.jpg
!/img/s/index.php
!/img/scenes
!/img/st/index.php
!/img/su/index.php
!/img/t/index.php
!/img/tmp/index.php

# Upload
/upload/*
!/upload/index.php
!/upload/.htaccess

/docs/phpdoc-sf/
*.hot-update.js
*.hot-update.json

tests/Resources/img/*
tests/Resources/img/tmp/*
tests/Resources/img/tmp/.gitkeep
!tests/Resources/download/.gitkeep
tests/Resources/download/*
tests/Unit/.phpunit.result.cache
.phpunit.result.cache
tests/Integration/.phpunit.result.cache
tests-legacy/.phpunit.result.cache

/$ADMIN_FOLDER/autoupgrade/*
!/$ADMIN_FOLDER/autoupgrade/index.php
!/$ADMIN_FOLDER/autoupgrade/backup/index.php

/$ADMIN_FOLDER/backups/*
!/$ADMIN_FOLDER/backups/.htaccess

/$ADMIN_FOLDER/import/*
!/$ADMIN_FOLDER/import/.htaccess
!/$ADMIN_FOLDER/import/index.php

/$ADMIN_FOLDER/export/*
!/$ADMIN_FOLDER/export/.htaccess
!/$ADMIN_FOLDER/export/index.php

# Downloaded RTL files
/$ADMIN_FOLDER/themes/default/css/bundle/default_rtl.css
/$ADMIN_FOLDER/themes/default/css/bundle/shared_rtl.css
/$ADMIN_FOLDER/themes/default/css/font_rtl.css
/$ADMIN_FOLDER/themes/default/css/overrides_rtl.css
/$ADMIN_FOLDER/themes/default/css/vendor/font-awesome/font-awesome_rtl.css
/$ADMIN_FOLDER/themes/default/css/vendor/nv.d3_rtl.css
/$ADMIN_FOLDER/themes/default/css/vendor/titatoggle-min_rtl.css
/$ADMIN_FOLDER/themes/default/public/theme_rtl.css
/$ADMIN_FOLDER/themes/default/public/*
/$ADMIN_FOLDER/themes/new-theme/css/module/drop_rtl.css
/$ADMIN_FOLDER/themes/new-theme/css/right-sidebar_rtl.css
/$ADMIN_FOLDER/themes/new-theme/public/*
!/$ADMIN_FOLDER/themes/new-theme/public/theme.rtlfix
!/$ADMIN_FOLDER/themes/default/public/theme.rtlfix

themes/*/cache/*
themes/core.js.map
themes/core.js
themes/*-chunk.js
themes/*-chunk.js.map

# Config

config/defines_custom.inc.php
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

# Themes, modules and overrides

modules/*
!modules/custom/*
override/*
themes/*/
themes/classic
!themes/_core
!themes/_libraries
!themes/custom/*

# Vendors and dependencies

bower_components/
node_modules/
composer.phar
php-cs-fixer
.grunt/*

# Translations and emails templates

translations/*
!translations/default
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

# MISC

*sitemap.xml
/robots.txt
*/CHANGELOG.txt
*/INSTALL.txt

# Symfony

/bin/
/.web-server-pid
/app/Resources/geoip/GeoLite2-City.mmdb
/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
!var/class_stub.php
!/var/modules
/var/modules/*
!/var/modules/.gitkeep
/vendor/
/web/bundles/

# Release creation
tools/build/releases/*
!tools/build/releases/.gitkeep

# Docker configuration
install.lock
docker-compose.override.yml