DEV Community

Discussion on: Managing dotenv files in git repositories

Collapse
 
karfau profile image
Christian Bewernitz • Edited

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?

Collapse
 
bdmason profile image
bdmason

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.