Skip to content

Commit 989e809

Browse files
authored
Clarify when copying .env files is safe (#9)
📝 Update README.md with security best practices for handling sensitive files and clarify development vs production credentials
1 parent 46443ba commit 989e809

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,19 @@ gtr config add gtr.copy.exclude "**/.env"
334334
gtr config add gtr.copy.exclude "**/secrets.*"
335335
```
336336

337-
> [!WARNING]
338-
> Be careful not to copy sensitive files. Use `.env.example` instead of `.env`.
337+
#### Security Best Practices
338+
339+
**The key distinction:** Development secrets (test API keys, local DB passwords) are **low risk** on personal machines. Production credentials are **high risk** everywhere.
340+
341+
```bash
342+
# Personal dev: copy what you need to run dev servers
343+
gtr config add gtr.copy.include "**/.env.development"
344+
gtr config add gtr.copy.include "**/.env.local"
345+
gtr config add gtr.copy.exclude "**/.env.production" # Never copy production
346+
```
347+
348+
> [!TIP]
349+
> The tool only prevents path traversal (`../`). Everything else is your choice - copy what you need for your worktrees to function.
339350
340351
### Hooks
341352

0 commit comments

Comments
 (0)