Skip to content

Instantly share code, notes, and snippets.

@jcandan
Created June 30, 2020 12:25
Show Gist options
  • Save jcandan/ebe1fc11a92a65f45eabf5dc41c5621e to your computer and use it in GitHub Desktop.
Save jcandan/ebe1fc11a92a65f45eabf5dc41c5621e to your computer and use it in GitHub Desktop.
Drupal 8 Gitignore
# This file contains .gitignore rules that are often used with Drupal projects.
# Because .gitignore is specific to your site and its deployment processes, you
# may need to uncomment, add, or remove rules.
#
# This particular .gitignore file is a combination of the patch found at
# https://www.drupal.org/project/drupal/issues/3082958 and the Pantheon Drops 8
# packages ignore directives at
# https://github.com/pantheon-systems/example-drops-8-composer/blob/master/.gitignore.
# Ignore configuration files that may contain sensitive information.
#
# Typically, settings.php and related files are not committed to the
# repository because they contain information such as the database
# credentials that could be used to compromise a site. Sometimes,
# a settings.php might be committed to the repository if it reads
# sensitive information from environment variables or other sources.
# ------------------------------------------------------------------
/web/sites/*/settings*.php
/web/sites/*/services*.yml
# Ignore paths that contain user-generated content.
/web/sites/*/files
/web/sites/*/private
# Ignore directories generated by Composer
#
# See the "installer-paths" section in the top-level composer.json
# file.
# ------------------------------------------------------------------
/drush/Commands/contrib/
/web/core/
/web/modules/contrib/
/web/themes/contrib/
/web/profiles/contrib/
/web/libraries/
# Generally you should only ignore the root vendor directory. It's important
# that core/assets/vendor and any other vendor directories within contrib or
# custom module, theme, etc., are not ignored unless you purposely do so.
/vendor/
# Ignore scaffold files
#
# Note that the scaffold plugin may be used to automatically manage
# a site's .gitignore files. If the `vendor` directory is ignored,
# then one or more .gitignore files will be written to also ignore
# any file placed by scaffolding. To avoid the creation of
# additional .gitignore files, add all of the scaffold file
# locations to the top-level .gitignore file, as shown below.
# ------------------------------------------------------------------
/web/.csslintrc
/web/.eslintignore
/web/.eslintrc.json
/web/.ht.router.php
/web/.htaccess
/web/INSTALL.txt
/web/README.txt
/web/autoload.php
/web/example.gitignore
/web/index.php
/web/robots.txt
/web/update.php
/web/web.config
/web/modules/README.txt
/web/profiles/README.txt
/web/sites/README.txt
/web/sites/default/default.services.yml
/web/sites/default/default.settings.php
/web/sites/development.services.yml
/web/sites/example.settings.local.php
/web/sites/example.sites.php
/web/themes/README.txt
/.editorconfig
/.gitattributes
# Other common rules
# ------------------
# Ignore files generated by PhpStorm
#/.idea/
# Ignore .env files as they are personal
#/.env
# Packages
# --------
*.7z
*.dmg
*.gz
*.bz2
*.iso
*.jar
*.rar
*.tar
*.zip
*.tgz
# Logs and databases
# ------------------
*.log
*.sql
# OS generated files
# ------------------
.DS_Store*
ehthumbs.db
Thumbs.db
._*
# Vim generated files
# -------------------
*.un~
# SASS
# ----
.sass-cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment