Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Place default .gitignore in drowl-init #115

Open
JPustkuchen opened this issue Dec 15, 2022 · 1 comment
Open

Place default .gitignore in drowl-init #115

JPustkuchen opened this issue Dec 15, 2022 · 1 comment
Labels
postponed Postponed for later

Comments

@JPustkuchen
Copy link
Member

JPustkuchen commented Dec 15, 2022

Context / Problem

When creating a git repository for a whole ddev Drupal project (not just single modules), it's helpful and best practice to have a top-level .gitignore file which ensures only the custom parts are added and especially no secrets are pushed to git.

FYI: Git only cares for the .gitignore file at the level, where the .git repository is created, as it seems

Currently, we don't create a best practice .gitignore at the root level of the project, but we should do. The .gitignore from Drupal at web/.gitignore isn't considered, due to the reason above.

Proposed solution

When running drowl-init, we should place a template best-practice .gitignore file. Here's our current default:

# Ignore directories generated by composer, for temporary or user-generated files
/files/private/
/log/
/tmp/
/vendor/

# Ignore Drupal directories
/web/core/
/web/modules/contrib/
/web/themes/contrib/
/web/profiles/contrib/
/web/libraries/
/web/sites/simpletest/
/drush/contrib/

# Ignore Drupal files
/web/modules/README.txt
/web/profiles/README.txt
/web/sites/development.services.yml
/web/sites/example.settings.local.php
/web/sites/example.sites.php
/web/sites/README.txt
/web/themes/README.txt
/web/autoload.php
/web/example.gitignore
/web/index.php
/web/INSTALL.txt
/web/LICENSE.txt
/web/README.txt
/web/update.php

# Ignore project / environment specific information
/web/.csslintrc
/web/.editorconfig
/web/.eslintignore
/web/.eslintrc.json
/web/.gitattributes
#webksde#JP: We better keep those to be able to restore if something bad happens:
#/web/.htaccess
#/web/.ht.router.php
#/web/web.config
#/web/robots.txt
#/web/composer.json
/web/composer.lock

# Ignore configuration files that may contain sensitive information
/web/sites/*/*settings*.php
/web/sites/*/*services*.yml

# Ignore paths that may contain user-generated content
/web/sites/*/files
/web/sites/*/public
/web/sites/*/private
/web/sites/*/files-public
/web/sites/*/files-private

# Ignore paths that may contain temporary files
/web/sites/*/translations
/web/sites/*/tmp
/web/sites/*/cache

# Ignore directories generated by Composer
/vendor/

# Ignore .env files as they are personal
/.env

# Ignore other configurations
/.editorconfig
/.gitattributes
/.ddev

# Ignore IDE specific files
/.vscode/
/.history/
/.idea/
/.vscode/
*.iml
*.code-workspace

# Ignore all log files
*.log

# Ignore node modules
node_modules

# Ignore css maps
*.css.map

# Ignore local db-dumps
*.sql
*.sql*

# Ignore Packages
*.7z
*.dmg
*.gz
*.bz2
*.iso
*.jar
*.rar
*.tar
*.zip
*.tgz

@joshsedl
Copy link
Collaborator

As this repository is mainly used for development purposes, I will postpone this on #124

@joshsedl joshsedl added the postponed Postponed for later label Apr 18, 2023
@joshsedl joshsedl removed their assignment Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
postponed Postponed for later
Projects
None yet
Development

No branches or pull requests

2 participants