Skip to content

chore: add .envrc to .gitignore#237

Open
wheeljackz wants to merge 1 commit intomainfrom
chore/add-envrc-to-gitignore
Open

chore: add .envrc to .gitignore#237
wheeljackz wants to merge 1 commit intomainfrom
chore/add-envrc-to-gitignore

Conversation

@wheeljackz
Copy link
Copy Markdown
Collaborator

Adds .envrc to .gitignore to prevent accidentally committing direnv environment files.

Also restores deleted .beads/ files (unstaged deletions, not committed).

Copy link
Copy Markdown
Collaborator Author

@wheeljackz wheeljackz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick review: .envrc is the right file to ignore, but I found one missing case in the surrounding env-file rules.

Comment thread .gitignore

# Local backup files
prisma/backups/
.envrc
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*.local.* does not match .env.local, and .env.test is still committable even though the other environment-specific .env.* files are already ignored. Since these files can hold the same local secrets as .envrc, can we widen the ignore rules to cover the remaining local env variants too while still keeping .env.example tracked?

Copy link
Copy Markdown
Collaborator Author

@wheeljackz wheeljackz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .envrc addition looks right. I left one inline note for an adjacent direnv ignore gap.

Comment thread .gitignore

# Local backup files
prisma/backups/
.envrc
Copy link
Copy Markdown
Collaborator Author

@wheeljackz wheeljackz Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.envrc is the right addition here. Since this repo is using direnv, can we also ignore .direnv/ in the same change? That directory is generated by direnv tooling and can cache environment-derived state, so it is another easy place for local secrets to leak accidentally if it ever appears in the worktree.

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