How to push incomplete .env file to repo?

https://github.com/sapphiredev/gemboard/blob/main/src/.env -> Wondering how this environment file is easily pushed with the token removed (i assume) automatically. Is there a hook/gitignore to setup to automatically remove specific tokens from the environment file or is there a separate .env.local file that is excluded from the repo?
GitHub
gemboard/src/.env at main · sapphiredev/gemboard
A private starboard bot for the Sapphire server. Contribute to sapphiredev/gemboard development by creating an account on GitHub.
Solution:
There are separate env files, but basically you can use .env.development.local for development tokens/secrets, and .env.production.local for production ones. They're not pushed because .gitignore: https://github.com/sapphiredev/gemboard/blob/main/.gitignore#L24-L27 The reason why the extra files work (when dotenv wouldn't load further than just .env) is because the project uses @skyra/env-utilities (dependencies in package.json), which loads them, more information on the package's README....
Jump to solution
2 Replies
Solution
kyra
kyra11mo ago
There are separate env files, but basically you can use .env.development.local for development tokens/secrets, and .env.production.local for production ones. They're not pushed because .gitignore: https://github.com/sapphiredev/gemboard/blob/main/.gitignore#L24-L27 The reason why the extra files work (when dotenv wouldn't load further than just .env) is because the project uses @skyra/env-utilities (dependencies in package.json), which loads them, more information on the package's README.
Songbird
SongbirdOP11mo ago
thanks! knew it was something simple
Want results from more Discord servers?
Add your server