|
| 1 | +# @see https://www.drupal.org/project/drupal/issues/3082958#comment-13433619 |
| 2 | +# This file contains .gitignore rules that are often used with Drupal projects. |
| 3 | +# Because .gitignore is specific to your site and its deployment processes, you |
| 4 | +# may need to uncomment, add, or remove rules. |
| 5 | +# |
| 6 | +# To ignore all paths that composer manages when using this project template, |
| 7 | +# remove all double-hashed (##) lines. |
| 8 | + |
| 9 | + |
| 10 | +# Ignore configuration files that may contain sensitive information. |
| 11 | +# |
| 12 | +# Typically, settings.php and related files are not committed to the |
| 13 | +# repository because they contain information such as the database |
| 14 | +# credentials that could be used to compromise a site. Sometimes, |
| 15 | +# a settings.php might be committed to the repository if it reads |
| 16 | +# sensitive information from environment variables or other sources. |
| 17 | +# ------------------------------------------------------------------ |
| 18 | +/web/sites/*/settings*.php |
| 19 | +/web/sites/*/services*.yml |
| 20 | + |
| 21 | +# Ignore paths that contain user-generated content. |
| 22 | +/web/sites/*/files |
| 23 | +/web/sites/*/private |
| 24 | + |
| 25 | +# Ignore SimpleTest multi-site environment. |
| 26 | +/web/sites/simpletest |
| 27 | + |
| 28 | + |
| 29 | +# Ignore custom modules managed by Composer. |
| 30 | +# |
| 31 | +# When a development team creates one or more custom modules that |
| 32 | +# are intended for use on more than one site, the typical strategy |
| 33 | +# is to register them in Packagist and give them the type |
| 34 | +# `drupal-custom-module` instead of `drupal-module`. This will cause |
| 35 | +# Composer to install them to the directory `modules/custom`. |
| 36 | +# |
| 37 | +# An alternate strategy for custom modules is to commit them |
| 38 | +# directly to the repository of the site where they are used. This |
| 39 | +# is commonly done with modules that are specific to just one site. |
| 40 | +# |
| 41 | +# Sites that have both Composer-managed custom modules and custom |
| 42 | +# modules that are committed directly to the repository may ignore |
| 43 | +# the `modules/custom` directory with the first rule shown below, |
| 44 | +# and then allow the locations to be committed on a case-by-case |
| 45 | +# basis by re-adding paths using `!` rules. A path that begins with |
| 46 | +# a `!` will allow a previously-ignored path to be added to the |
| 47 | +# repository. Note, however, that a path cannot be re-added if any |
| 48 | +# of its parent directories are excluded. This is why we use the |
| 49 | +# rule `/modules/custom/*` instead of `/modules/custom`. |
| 50 | +# |
| 51 | +# Sites that do not have any Composer-managed custom modules may |
| 52 | +# delete all of the `modules/custom` lines below. |
| 53 | +# ------------------------------------------------------------------ |
| 54 | +/web/modules/custom/* |
| 55 | +#!/web/modules/custom/module_in_repo |
| 56 | + |
| 57 | + |
| 58 | +# Ignore directories generated by Composer |
| 59 | +# |
| 60 | +# See the "installer-paths" section in the top-level composer.json |
| 61 | +# file. |
| 62 | +# ------------------------------------------------------------------ |
| 63 | +/drush/Commands/contrib/ |
| 64 | +/web/core/ |
| 65 | +/web/modules/contrib/ |
| 66 | +/web/themes/contrib/ |
| 67 | +/web/profiles/contrib/ |
| 68 | +/web/libraries/ |
| 69 | + |
| 70 | +# Generally you should only ignore the root vendor directory. It's important |
| 71 | +# that core/assets/vendor and any other vendor directories within contrib or |
| 72 | +# custom module, theme, etc., are not ignored unless you purposely do so. |
| 73 | +/vendor/ |
| 74 | + |
| 75 | +# Ignore scaffold files |
| 76 | +# |
| 77 | +# Note that the scaffold plugin may be used to automatically manage |
| 78 | +# a site's .gitignore files. If the `vendor` directory is ignored, |
| 79 | +# then one or more .gitignore files will be written to also ignore |
| 80 | +# any file placed by scaffolding. To avoid the creation of |
| 81 | +# additional .gitignore files, add all of the scaffold file |
| 82 | +# locations to the top-level .gitignore file, as shown below. |
| 83 | +# ------------------------------------------------------------------ |
| 84 | +/web/.csslintrc |
| 85 | +/web/.editorconfig |
| 86 | +/web/.eslintignore |
| 87 | +/web/.eslintrc.json |
| 88 | +/web/.gitattributes |
| 89 | +/web/.ht.router.php |
| 90 | +/web/.htaccess |
| 91 | +/web/INSTALL.txt |
| 92 | +/web/README.txt |
| 93 | +/web/autoload.php |
| 94 | +/web/example.gitignore |
| 95 | +/web/index.php |
| 96 | +/web/robots.txt |
| 97 | +/web/update.php |
| 98 | +/web/web.config |
| 99 | +/web/modules/README.txt |
| 100 | +/web/profiles/README.txt |
| 101 | +/web/sites/README.txt |
| 102 | +/web/sites/default/default.services.yml |
| 103 | +/web/sites/default/default.settings.php |
| 104 | +/web/sites/development.services.yml |
| 105 | +/web/sites/example.settings.local.php |
| 106 | +/web/sites/example.sites.php |
| 107 | +/web/themes/README.txt |
| 108 | + |
| 109 | + |
| 110 | +# Other common rules |
| 111 | +# ------------------ |
| 112 | +# Ignore files generated by PhpStorm |
| 113 | +/.idea/ |
| 114 | + |
| 115 | +# Ignore .env files as they are personal |
| 116 | +#/.env |
| 117 | + |
| 118 | +# ------------------------------------------------------------------------------ |
| 119 | + |
| 120 | +# @see https://github.com/github/gitignore/blob/e448b41613502a56c8124916874cf3b6b098d1ce/Drupal.gitignore |
| 121 | +# gitignore template for Drupal 8 projects |
| 122 | +# |
| 123 | +# earlier versions of Drupal are tracked in `community/PHP/` |
| 124 | +# |
| 125 | +# follows official upstream conventions: |
| 126 | +# https://www.drupal.org/docs/develop/using-composer |
| 127 | + |
| 128 | +# Ignore configuration files that may contain sensitive information |
| 129 | +/web/sites/*/*settings*.php |
| 130 | +/web/sites/*/*services*.yml |
| 131 | + |
| 132 | +# Ignore paths that may contain user-generated content |
| 133 | +/web/sites/*/files |
| 134 | +/web/sites/*/public |
| 135 | +/web/sites/*/private |
| 136 | +/web/sites/*/files-public |
| 137 | +/web/sites/*/files-private |
| 138 | + |
| 139 | +# Ignore paths that may contain temporary files |
| 140 | +/web/sites/*/translations |
| 141 | +/web/sites/*/tmp |
| 142 | +/web/sites/*/cache |
| 143 | + |
| 144 | +# Ignore drupal core (if not versioning drupal sources) |
| 145 | +/web/vendor |
| 146 | +/web/core |
| 147 | +/web/modules/README.txt |
| 148 | +/web/profiles/README.txt |
| 149 | +/web/sites/development.services.yml |
| 150 | +/web/sites/example.settings.local.php |
| 151 | +/web/sites/example.sites.php |
| 152 | +/web/sites/README.txt |
| 153 | +/web/themes/README.txt |
| 154 | +/web/.csslintrc |
| 155 | +/web/.editorconfig |
| 156 | +/web/.eslintignore |
| 157 | +/web/.eslintrc.json |
| 158 | +/web/.gitattributes |
| 159 | +/web/.htaccess |
| 160 | +/web/.ht.router.php |
| 161 | +/web/autoload.php |
| 162 | +/web/composer.json |
| 163 | +/web/composer.lock |
| 164 | +/web/example.gitignore |
| 165 | +/web/index.php |
| 166 | +/web/INSTALL.txt |
| 167 | +/web/LICENSE.txt |
| 168 | +/web/README.txt |
| 169 | +/web/robots.txt |
| 170 | +/web/update.php |
| 171 | +/web/web.config |
| 172 | + |
| 173 | +# Ignore vendor dependencies and scripts |
| 174 | +/vendor |
| 175 | +/composer.phar |
| 176 | +/composer |
| 177 | +/robo.phar |
| 178 | +/robo |
| 179 | +/drush.phar |
| 180 | +/drush |
| 181 | +/drupal.phar |
| 182 | +/drupal |
| 183 | + |
| 184 | +# ------------------------------------------------------------------------------ |
| 185 | + |
| 186 | +# We want all custom site settings in settings.local.php |
| 187 | +!/web/sites/*/settings*.php |
| 188 | + |
| 189 | +# Ignore PhpStorm |
| 190 | +.idea |
| 191 | + |
| 192 | +# Ignore private files |
| 193 | +private-files/ |
| 194 | + |
| 195 | +# Ignore VS-code |
| 196 | +.vscode |
0 commit comments