Frameworks
Drupal .gitignore
.gitignore for frameworks projects
.gitignore Content
# ============================================================================
# Created by https://gitignores.com/
# COMPREHENSIVE FRAMEWORK TEMPLATE for Drupal
# Website: https://www.drupal.org/
# Repository: https://github.com/drupal/drupal
# ============================================================================
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# TEMPLATE OVERVIEW & USAGE NOTES
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# • TEMPLATE TYPE: COMPREHENSIVE FRAMEWORK TEMPLATE
# • PURPOSE: Complete Drupal patterns for module/theme development and deployment artifacts
# • DESIGN PHILOSOPHY: Comprehensive and self-contained with all necessary patterns
# • COMBINATION GUIDANCE: Can be used standalone or combined with IDE/OS templates
# • SECURITY CONSIDERATIONS: Includes comprehensive security patterns for sensitive data protection
# • BEST PRACTICES: Use as standalone template, review security patterns for your project needs, test with your deployment setup
# • OFFICIAL SOURCES: Drupal Framework official documentation, community guidelines, and deployment best practices
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# SECURITY & SENSITIVE DATA PROTECTION (ALWAYS FIRST!)
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# CRITICAL: Protect sensitive data from accidental commits to version control
*.key
*.pem
.env
.env.*.local
.env.local
.env.production
.secret
sites/*/private/
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# BUILD ARTIFACTS & DISTRIBUTION PACKAGES
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
*.tar
*.tar.gz
*.zip
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# DEPENDENCY MANAGEMENT & PACKAGE CACHE
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
.cache/
.php_cs.cache
.phpstan.cache
.phpunit.cache/
.phpunit.result.cache
.psalm.cache
vendor/
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# DEVELOPMENT & RUNTIME ARTIFACTS
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
*.log
*.tmp
.tmp/
php_errors.log
sites/*/cache/
sites/*/logs/
temp/
xdebug.log
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# DRUPAL-SPECIFIC PATTERNS
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
!sites/*/files/.gitkeep
*.code-workspace
*.sql
*.sql.gz
*.sublime-*
*.temp
.DS_Store
.pdepend/
.php-built-in-web-server.pid
.phpcbf/
.phpcpd/
.phpcs/
.phpdcd/
.phploc/
.phpmd/
.phpmetrics/
.phpstan/
.psalm/
behat.yml
composer.phar
css/
docs/
js/
libraries/
phpdoc/
sess_*
sites/*/files/
sites/*/settings.local.php
sites/*/settings.php
sites/*/tmp/
Thumbs.db
uploads/
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# TESTING & QUALITY ASSURANCE ARTIFACTS
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
coverage/
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# TEMPLATE CUSTOMIZATION & BEST PRACTICES
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# 1. REVIEW: Examine all patterns before use
# 2. CUSTOMIZE: Adapt to your project's specific structure
# 3. TEST: Use `git check-ignore` to verify patterns work correctly
# 4. SECURE: Always protect sensitive data and credentials
# 5. UPDATE: Review periodically as technology evolves
# For comprehensive coverage, this template can be used standalone.
# Optionally combine with IDE/OS templates if needed:
# EXAMPLE USAGE FOR DRUPAL PROJECT:
# cp frameworks/drupal.gitignore .gitignore