Skip to main content
Frameworks

Astro .gitignore

.gitignore for frameworks projects

View on GitHub

.gitignore Content

# ==============================================================================
# Created by https://gitignores.com/
# COMPREHENSIVE FRAMEWORK TEMPLATE for Astro
# Website: https://astro.build/
# Repository: https://github.com/withastro/astro
# ==============================================================================

# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# TEMPLATE OVERVIEW & USAGE NOTES
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# • TEMPLATE TYPE: COMPREHENSIVE FRAMEWORK TEMPLATE
# • PURPOSE: Complete Astro framework patterns for static site generation and build artifacts
# • DESIGN PHILOSOPHY: Self-contained with all Astro-specific patterns
# • COMBINATION GUIDANCE: Use standalone; optionally add IDE/OS templates
# • SECURITY CONSIDERATIONS: Includes security patterns for .env files and credentials
# • BEST PRACTICES: Review patterns before use, test with git check-ignore, customize for your project
# • OFFICIAL SOURCES: Astro documentation and community best practices

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# SECURITY & SENSITIVE DATA PROTECTION (ALWAYS FIRST!)
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# CRITICAL: Protect sensitive data from accidental commits to version control

*.crt
*.key
*.keystore
*.pem
*.secret
*.token
*_keys
*_secrets
*_tokens
.env
.env.*
.env.*.local
.env.local
id_dsa
id_rsa

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# BUILD ARTIFACTS & DISTRIBUTION
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

*.tar.gz
*.zip
dist/

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# DEPENDENCY MANAGEMENT & PACKAGE CACHE
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

*.tsbuildinfo
.cache/
.yarn-integrity
.yarn/build-state.yml
.yarn/cache
.yarn/install-state.gz
.yarn/unplugged
.yarn/versions/
build/
node_modules/

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# DEVELOPMENT & RUNTIME ARTIFACTS
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

*.log
*.log.*
.eslintcache
.grunt
.lock-wscript
.node_repl_history
.npm-debug.log*
.parcel-cache/
.pnpm-debug.log*
.rpt2_cache/
.tern-port
.tscache/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# FRAMEWORK-SPECIFIC PATTERNS
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

.my-app*
/.changelog
lib/
out/
public/
spec-reports
template/src/__tests__/__snapshots__/

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# TESTING & QUALITY ASSURANCE
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

.coverage
.coverage.*
.coverage.xml
.coverage_html/
.nyc_output/
coverage-reports
coverage/
htmlcov/
junit.xml
test-output/
test-reports
test-reports/
test-results/
testng-results.xml

# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# 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
# 4. SECURE: Always protect sensitive data and credentials
# 5. UPDATE: Review periodically as technology evolves

# RECOMMENDED USAGE PATTERNS:
# ==============================================================================
#
# BASIC USAGE (STANDALONE):
# -------------------------
# cp frameworks/astro.gitignore .gitignore
#
# WITH IDE SUPPORT:
# ----------------
# cat frameworks/astro.gitignore \
#     ides/visual-studio-code.gitignore | sort -u > .gitignore
#
# CROSS-PLATFORM DEVELOPMENT:
# ---------------------------
# cat frameworks/astro.gitignore \
#     os/linux.gitignore \
#     os/macos.gitignore \
#     os/windows.gitignore | sort -u > .gitignore
#
# IMPORTANT NOTES:
# ==============================================================================
# 1. This template is self-contained and includes security patterns
# 2. No need to add common/security.gitignore separately
# 3. Test with `git status --ignored` to ensure proper coverage

Note: This file is fetched from GitHub and cached for 7 days.