.gitignore for Sylius

31 ignore rules for Sylius, ready to copy into your repository.

Open source e-commerce framework based on Symfony

The complete .gitignore for Sylius

# Generated by LFGitignore - https://lfgitignore.com
# Created: 2025-08-01 13:33:33 UTC
# Technologies: Sylius

### Sylius ###
/behat.yml
/node_modules/
/composer.lock
/docker-compose.override.yml
npm-debug.log
/public/media
yarn-error.log
yarn.lock
!/public/media/image/.gitkeep
/etc/build/*
!/etc/build/.gitignore
/drivers/
/.php-version
/php.ini
/public/bundles/
# Variable data files
/var/
/config/encryption/dev.key
/vendor/
.env.*.local
# Local environment variables
.env.local
.env.local.php
/.php_cs.cache
/public/build/
pnpm-lock.yaml
package-lock.json
/.php_cs
/phpstan.neon
/phpunit.xml
/.phpunit.result.cache
/config/jwt/*.pem
!/config/jwt/*-test.pem

What these Sylius rules actually ignore

Every pattern below, and why it belongs in your .gitignore.

General

Pattern What it ignores
/behat.yml ##> project files ###
/node_modules/ General
/composer.lock General
/docker-compose.override.yml General
npm-debug.log General
/public/media General
yarn-error.log General
yarn.lock General
!/public/media/image/.gitkeep General
/etc/build/* ##> build ###
!/etc/build/.gitignore General
/drivers/ ##> drivers ###
/.php-version ##> configuration ###
/php.ini General
/public/bundles/ General
/var/ Variable data files
/config/encryption/dev.key ##> sylius/sylius ###
/vendor/ General
.env.*.local ##> symfony/framework-bundle ###
.env.local Local environment variables
.env.local.php General
/.php_cs.cache General
/public/build/ ##> symfony/webpack-encore-bundle ###
pnpm-lock.yaml General
package-lock.json General
/.php_cs ##> friendsofphp/php-cs-fixer ###
/phpstan.neon ##> phpstan/phpstan ###
/phpunit.xml ##> phpunit/phpunit ###
/.phpunit.result.cache General
/config/jwt/*.pem ##> lexik/jwt-authentication-bundle ###
!/config/jwt/*-test.pem General

How to use this .gitignore for Sylius

  1. Copy the Sylius rules above, or download the file directly.
  2. Create a file named .gitignore at the root of your Git repository and paste the rules into it.
  3. If some of those files are already tracked, run git rm -r --cached . then commit again — Git only applies ignore rules to untracked files.
  4. Commit the .gitignore so everyone on the team shares the same rules.

Other Framework .gitignore templates

See every Framework template