A curated collection of 129 standardized .gitignore templates for programming languages, frameworks, tools, and development environments. All templates follow consistent structure and organization defined in TEMPLATE_STANDARDS.md, ensuring security-first approach and comprehensive coverage.
Online Reference: gitignores.com β Online .gitignore generator and template reference
- π Quick Start
- π― Template Philosophy
- π Usage Examples
- π Template Highlights
- π§ Troubleshooting
- π€ Contributing
- β FAQ
| Use Case | Recommended Approach | Example |
|---|---|---|
| Framework/Full-stack project | Single framework template | frameworks/react.gitignore |
| Language-only project | Language + security template | languages/python.gitignore + common/security.gitignore |
| Custom toolchain | Combine multiple templates | Language + common + tools + IDE |
# Download a template
curl -o .gitignore https://raw.githubusercontent.com/ronald2wing/.gitignores/master/frameworks/react.gitignore
# Test it works
git init
touch .env node_modules/test.js dist/bundle.js
git status --ignoredSimple, complete, security-first β For most users
- β Self-contained: security + framework + language patterns
- β Security patterns placed FIRST
- β Everything needed in one file
- β Don't combine with language templates (duplicates)
Example: frameworks/react.gitignore includes security, React, JavaScript, and common patterns.
Modular, customizable β For advanced users
- β Language-specific patterns only
- β Combine with common templates as needed
- β Granular control over what's included
β οΈ Always includecommon/security.gitignore
Example: Custom Python setup with security, cache, and Docker patterns.
Never combine framework templates with language templates β Framework templates already include all necessary language patterns.
# React project (framework template)
curl -o .gitignore https://raw.githubusercontent.com/ronald2wing/.gitignores/master/frameworks/react.gitignore
# Python web project (language + common)
cat languages/python.gitignore \
common/security.gitignore \
common/cache.gitignore \
tools/docker.gitignore > .gitignore
# Multi-platform project
cat frameworks/react.gitignore \
os/linux.gitignore \
os/macos.gitignore \
os/windows.gitignore > .gitignore# Remove duplicates when combining
cat template1 template2 template3 | sort -u > .gitignore
# Test specific patterns
git check-ignore -v .env.local
git check-ignore -v node_modules/package.json
# Check all ignored files
git status --ignored# Full-stack JavaScript: React + Docker + VS Code
cat frameworks/react.gitignore \
tools/docker.gitignore \
ides/visual-studio-code.gitignore > .gitignore
# Data Science: Python + Jupyter + Docker
cat languages/python.gitignore \
common/security.gitignore \
tools/jupyter.gitignore \
tools/docker.gitignore > .gitignore| Category | Count | Key Examples |
|---|---|---|
| Common | 7 | security.gitignore (CRITICAL) |
| Frameworks | 34 | django.gitignore, react.gitignore |
| Languages | 31 | python.gitignore, node.gitignore |
| Tools | 37 | docker.gitignore, npm.gitignore |
| IDEs | 14 | visual-studio-code.gitignore |
| OS | 3 | macos.gitignore, windows.gitignore |
| Platforms | 3 | android.gitignore, ios.gitignore |
| Total | 129 |
security.gitignoreβ CRITICAL:.env*, credentials, sensitive filesbuild.gitignoreβ Build artifacts and temporary filescache.gitignoreβ Cache directories and temporary fileslogs.gitignoreβ Log files and runtime artifactsbackup.gitignoreβ Backup files and temporary copiesgit.gitignoreβ Git-specific files and metadatatesting.gitignoreβ Testing artifacts and coverage reports
- Web:
django.gitignore,ruby-on-rails.gitignore,laravel.gitignore,spring-boot.gitignore - JavaScript:
react.gitignore,vue.gitignore,angular.gitignore,nextjs.gitignore - Mobile:
flutter.gitignore,react-native.gitignore,ionic.gitignore - CMS:
wordpress.gitignore,drupal.gitignore,joomla.gitignore
- Popular:
python.gitignore,javascript.gitignore,java.gitignore,csharp.gitignore - Web:
typescript.gitignore,php.gitignore,html.gitignore,css.gitignore - Systems:
rust.gitignore,go.gitignore,cpp.gitignore,c.gitignore - Scripting:
bash.gitignore,powershell.gitignore,perl.gitignore
- Package Managers:
npm.gitignore,yarn.gitignore,composer.gitignore,pip.gitignore - Build Tools:
webpack.gitignore,vite.gitignore,docker.gitignore - Testing:
jest.gitignore,pytest.gitignore,cypress.gitignore - CI/CD:
github-actions.gitignore,gitlab-ci.gitignore
visual-studio-code.gitignoreintellij.gitignorevim.gitignoreemacs.gitignore
For comprehensive troubleshooting guidance, debugging workflows, and solutions to common issues, refer to the Troubleshooting section in AGENTS.md. This includes detailed solutions for:
- Files not being ignored
- Performance problems with large
.gitignorefiles - Template combination conflicts
- Security patterns missing
- Debugging workflow and testing procedures
We welcome contributions! Please see CONTRIBUTING.md for detailed guidelines.
- Fork the repository
- Create a branch for your changes
- Follow
TEMPLATE_STANDARDS.mdexactly - Test your template thoroughly
- Submit a pull request with clear description
- New Templates: Create templates for new technologies
- Template Improvements: Update existing templates
- Bug Fixes: Correct errors in existing templates
- Documentation: Improve documentation
A: Use framework templates for complete projects (React, Django, etc.). Use language + common templates for custom setups or when you need granular control.
A: Language templates focus on language-specific patterns. Security patterns are in common/security.gitignore to ensure they're always included when needed and to avoid duplication.
A: Use cat to combine templates, then sort -u to remove duplicates:
cat template1 template2 template3 | sort -u > .gitignoreA:
- Check file location:
.gitignoreshould be in repository root - Test patterns:
git check-ignore -v <file> - Check for conflicts:
git status --ignored - Verify no syntax errors in patterns
A: Yes! Open an issue or submit a pull request. Check if the template already exists first.
A: Templates are reviewed quarterly for accuracy and updated when technologies release new versions.
Maintained by: gitignores.com Repository: https://github.com/ronald2wing/.gitignores Online Tool: https://gitignores.com