diff --git a/composer/Template/LegacyProject/.gitignore b/composer/Template/LegacyProject/.gitignore new file mode 100644 index 0000000000..b3c7a706e2 --- /dev/null +++ b/composer/Template/LegacyProject/.gitignore @@ -0,0 +1,116 @@ +# This file contains .gitignore rules that are specific to the structure of the +# Drupal legacy-project Composer template. Because .gitignore is specific to +# your site and its deployment processes, you may need to uncomment, add, or +# remove rules. +# +# To ignore all paths that Composer manages when using this project template, +# remove all double-hashed (##) lines. + + +# 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. +# ------------------------------------------------------------------ +/sites/*/settings*.php +/sites/*/services*.yml + +# Ignore paths that contain user-generated content. +/sites/*/files +/sites/*/private + +# Ignore SimpleTest multi-site environment. +/sites/simpletest + + +# Ignore custom modules managed by Composer. +# +# When a development team creates one or more custom modules that +# are intended for use on more than one site, the typical strategy +# is to register them in Packagist and give them the type +# `drupal-custom-module` instead of `drupal-module`. This will cause +# Composer to install them to the directory `modules/custom`. +# +# An alternate strategy for custom modules is to commit them +# directly to the repository of the site where they are used. This +# is commonly done with modules that are specific to just one site. +# +# Sites that have both Composer-managed custom modules and custom +# modules that are committed directly to the repository may ignore +# the `modules/custom` directory with the first rule shown below, +# and then allow the locations to be committed on a case-by-case +# basis by re-adding paths using `!` rules. A path that begins with +# a `!` will allow a previously-ignored path to be added to the +# repository. Note, however, that a path cannot be re-added if any +# of its parent directories are excluded. This is why we use the +# rule `/modules/custom/*` instead of `/modules/custom`. +# +# Sites that do not have any Composer-managed custom modules may +# delete all of the `modules/custom` lines below. +# ------------------------------------------------------------------ +##/modules/custom/* +#!/modules/custom/module_in_repo + + +# Ignore directories generated by Composer +# +# See the "installer-paths" section in the top-level composer.json +# file. +# ------------------------------------------------------------------ +##/drush/Commands/contrib/ +##/core/ +##/modules/contrib/ +##/themes/contrib/ +##/profiles/contrib/ +##/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. +# ------------------------------------------------------------------ +##/.csslintrc +##/.editorconfig +##/.eslintignore +##/.eslintrc.json +##/.gitattributes +##/.ht.router.php +##/.htaccess +##/INSTALL.txt +##/README.txt +##/autoload.php +##/example.gitignore +##/index.php +##/robots.txt +##/update.php +##/web.config +##/modules/README.txt +##/profiles/README.txt +##/sites/README.txt +##/sites/default/default.services.yml +##/sites/default/default.settings.php +##/sites/development.services.yml +##/sites/example.settings.local.php +##/sites/example.sites.php +##/themes/README.txt + + +# Other common rules +# ------------------ +# Ignore files generated by PhpStorm +#/.idea/ + +# Ignore .env files as they are personal +#/.env diff --git a/composer/Template/RecommendedProject/.gitignore b/composer/Template/RecommendedProject/.gitignore new file mode 100644 index 0000000000..4fb2137abb --- /dev/null +++ b/composer/Template/RecommendedProject/.gitignore @@ -0,0 +1,116 @@ +# This file contains .gitignore rules that are specific to the structure of the +# Drupal recommended-project Composer template. Because .gitignore is specific +# to your site and its deployment processes, you may need to uncomment, add, or +# remove rules. +# +# To ignore all paths that Composer manages when using this project template, +# remove all double-hashed (##) lines. + + +# 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 SimpleTest multi-site environment. +/web/sites/simpletest + + +# Ignore custom modules managed by Composer. +# +# When a development team creates one or more custom modules that +# are intended for use on more than one site, the typical strategy +# is to register them in Packagist and give them the type +# `drupal-custom-module` instead of `drupal-module`. This will cause +# Composer to install them to the directory `modules/custom`. +# +# An alternate strategy for custom modules is to commit them +# directly to the repository of the site where they are used. This +# is commonly done with modules that are specific to just one site. +# +# Sites that have both Composer-managed custom modules and custom +# modules that are committed directly to the repository may ignore +# the `modules/custom` directory with the first rule shown below, +# and then allow the locations to be committed on a case-by-case +# basis by re-adding paths using `!` rules. A path that begins with +# a `!` will allow a previously-ignored path to be added to the +# repository. Note, however, that a path cannot be re-added if any +# of its parent directories are excluded. This is why we use the +# rule `/modules/custom/*` instead of `/modules/custom`. +# +# Sites that do not have any Composer-managed custom modules may +# delete all of the `modules/custom` lines below. +# ------------------------------------------------------------------ +##/web/modules/custom/* +#!/web/modules/custom/module_in_repo + + +# 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/.editorconfig +##/web/.eslintignore +##/web/.eslintrc.json +##/web/.gitattributes +##/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 + + +# Other common rules +# ------------------ +# Ignore files generated by PhpStorm +#/.idea/ + +# Ignore .env files as they are personal +#/.env diff --git a/core/assets/scaffold/files/example.gitignore b/core/assets/scaffold/files/example.gitignore index d77a48bc88..d04d7af8aa 100644 --- a/core/assets/scaffold/files/example.gitignore +++ b/core/assets/scaffold/files/example.gitignore @@ -1,8 +1,8 @@ -# This file contains default .gitignore rules. To use it, copy it to .gitignore, -# and it will cause files like your settings.php and user-uploaded files to be -# excluded from Git version control. This is a common strategy to avoid -# accidentally including private information in public repositories and patch -# files. +# This file contains example .gitignore rules used when installing Drupal from +# source. To use it, copy it to .gitignore, and it will cause files like your +# settings.php and user-uploaded files to be excluded from Git version control. +# This is a common strategy to avoid accidentally including private information +# in public repositories and patch files. # # Because .gitignore can be specific to your site, this file has a different # name; updating Drupal core will not override your custom .gitignore file. diff --git a/example.gitignore b/example.gitignore index d77a48bc88..d04d7af8aa 100644 --- a/example.gitignore +++ b/example.gitignore @@ -1,8 +1,8 @@ -# This file contains default .gitignore rules. To use it, copy it to .gitignore, -# and it will cause files like your settings.php and user-uploaded files to be -# excluded from Git version control. This is a common strategy to avoid -# accidentally including private information in public repositories and patch -# files. +# This file contains example .gitignore rules used when installing Drupal from +# source. To use it, copy it to .gitignore, and it will cause files like your +# settings.php and user-uploaded files to be excluded from Git version control. +# This is a common strategy to avoid accidentally including private information +# in public repositories and patch files. # # Because .gitignore can be specific to your site, this file has a different # name; updating Drupal core will not override your custom .gitignore file.