Skip to content

Improve .gitignore with additional patterns - #234

Open
MiWeiss wants to merge 1 commit into
mainfrom
chore/improve-gitignore
Open

Improve .gitignore with additional patterns#234
MiWeiss wants to merge 1 commit into
mainfrom
chore/improve-gitignore

Conversation

@MiWeiss

@MiWeiss MiWeiss commented Jan 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Enhanced .gitignore with commonly needed patterns
  • Organized entries by category with comments
  • Prevents accidental commits of sensitive and temporary files

Changes Made

Added Patterns

General logs:

  • *.log - All log files (supplements existing npm-debug.log)

Environment files:

  • .env and .env.* - Environment configuration files (may contain secrets)
  • !.env.example - Explicitly allow example env files

Editor files:

  • *.swp, *.swo - Vim swap files
  • *~ - Backup files from various editors

Python:

  • *.pyc, *.pyo - Python bytecode files
  • .python-version - pyenv version file

OS files:

  • .DS_Store - macOS folder metadata
  • Thumbs.db - Windows thumbnail cache

Organization

Added comments to group related patterns:

  • Node
  • Build output
  • Environment files
  • IDE and editor files
  • Python
  • Browser extension
  • OS files
  • Jekyll

Why This Matters

Security:

  • .env files often contain API keys and secrets
  • Prevents accidental exposure of sensitive data

Collaboration:

  • OS-specific files (.DS_Store, Thumbs.db) clutter repos
  • Editor swap files cause merge conflicts
  • Python bytecode (.pyc) shouldn't be version controlled

Cleanliness:

  • Reduces clutter in git status
  • Prevents unnecessary files in commits
  • Makes repo more professional

Common Scenarios Prevented

  1. Developer on macOS accidentally commits .DS_Store files
  2. Developer using Vim leaves .swp files that cause conflicts
  3. .env file with production secrets gets committed
  4. Python cache files pollute the repo

Test Plan

  • Verify existing ignored files still work
  • Check that new patterns correctly ignore test files
  • Confirm .env.example is still tracked (if it exists)

🤖 Generated with Claude Code

Enhanced .gitignore with commonly needed patterns:

Added entries for:
- General log files (*.log)
- Environment files (.env, .env.*)
- Editor swap files (*.swp, *.swo, *~)
- Python cache files (*.pyc, *.pyo, .python-version)
- OS files (.DS_Store, Thumbs.db)

Organized entries with comments by category:
- Node
- Build output
- Environment files
- IDE and editor files
- Python
- Browser extension
- OS files
- Jekyll

This prevents accidental commits of sensitive data, OS-specific
files, and temporary editor files.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant