Skip to content

chore: ignore every .env variant, not one at a time - #407

Merged
abrichr merged 3 commits into
mainfrom
chore/gitignore-env-variants
Aug 26, 2026
Merged

chore: ignore every .env variant, not one at a time#407
abrichr merged 3 commits into
mainfrom
chore/gitignore-env-variants

Conversation

@abrichr

@abrichr abrichr commented Aug 26, 2026

Copy link
Copy Markdown
Member

.gitignore covered .env and .env.backup but not .env.bak, .env.local, or .env.old.

This surfaced concretely: a .env.bak containing populated OpenAI, Anthropic, and Google keys has sat in a local stash in OpenAdapt since 2026-07-13. It is untracked, on no remote, and absent from disk, so nothing leaked. But it was one git add -A from being committed, and the existing .env.backup line shows this was already patched by hand once before after a similar near-miss.

Replaces the one-at-a-time approach with .env.* and negates .env.example so the committed template stays tracked. Verified in each repo: .env.bak is now ignored and .env.example is not.

Applied to all six repos that had the same gap.

.gitignore covered .env and .env.backup but not .env.bak, .env.local or
.env.old. A .env.bak containing populated OpenAI, Anthropic and Google
keys sat in a local stash since 2026-07-13, untracked and one
`git add -A` away from being committed.

Replace the one-at-a-time entries with a glob and negate the committed
.env.example template.
@abrichr
abrichr force-pushed the chore/gitignore-env-variants branch from dfe2301 to 70afc5d Compare August 26, 2026 20:12
@abrichr
abrichr enabled auto-merge (squash) August 26, 2026 20:49
@abrichr
abrichr merged commit e094dbc into main Aug 26, 2026
15 checks passed
@abrichr
abrichr deleted the chore/gitignore-env-variants branch August 26, 2026 22:55
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