Discussion on: Managing dotenv files in git repositories

karfau profile image
Christian Bewernitz

I don't get something here: we do not put .env under version control, to avoid leaking secrets, but then you put the data to put into the file into another file to generate it.

Why is this not defeating the purpose of not storing this data in version control?

bdmason profile image

It's instead of copying, renaming, and editing .env.example.

You don't put sensitive info in the json file, just defaults. When you run envup the interactive cli asks you to enter all the values.

I got that from the screenshot; it could be explained a little further in the article.