Skip to content

chore: untrack .env and gitignore all .env* files#43

Merged
eric-becker merged 1 commit into
mainfrom
chore/untrack-dotenv
May 2, 2026
Merged

chore: untrack .env and gitignore all .env* files#43
eric-becker merged 1 commit into
mainfrom
chore/untrack-dotenv

Conversation

@eric-becker
Copy link
Copy Markdown
Owner

Summary

Remove the previously-tracked .env from the index and broaden the gitignore pattern to .env* so all dotenv variants stay out of git.

The committed .env only held a non-secret PYTHONDONTWRITEBYTECODE=1 hint with a "no secrets here" comment, so this isn't a credential leak. But committing any .env is a foot-gun: it normalizes the practice and makes it trivial for a future contributor to drop a real secret in unaware. Belt-and-suspenders.

Changes

  • git rm .env — file no longer tracked
  • .gitignore.env.local line replaced with .env* (covers .env, .env.local, .env.production, etc.)
  • CONTRIBUTING.md — replaced the set -a; . ./.env; set +a instruction with an inline export PYTHONDONTWRITEBYTECODE=1 so the dev-convenience survives without the tracked file

Test plan

  • git check-ignore -v .env .env.local .env.production — all three caught by the new pattern
  • CI lint + unit tests pass (no behavior change; .env was never used by code)

🤖 Generated with Claude Code

Even though the previously-committed .env held only a non-secret
PYTHONDONTWRITEBYTECODE=1 hint, committing any .env is a foot-gun:
it normalizes the practice and makes it easy for a future contributor
to drop a real secret into the file unaware. Remove it from the index
and broaden the ignore pattern from .env.local to .env* so all
dotenv variants stay out of git by default.

CONTRIBUTING.md previously instructed contributors to source ./.env
for the bytecode hint; replace that with an inline export so the
convenience survives without the tracked file.
@eric-becker eric-becker merged commit 580853c into main May 2, 2026
8 checks passed
@eric-becker eric-becker deleted the chore/untrack-dotenv branch May 2, 2026 08:18
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