DEV Community

Discussion on: Please don't commit .env

Collapse
 
alyson profile image
aly quey

I add on ~/.gitignore_global. 🐣🐣

Collapse
 
somedood profile image
Basti Ortiz

That's good and all, but as @matthias mentioned, it's still important to add them to your repositories because other people will also work on them. They might not have configured their global .gitignore like you have, which might cause them to accidentally commit the .env file.

Itβ€˜s a good idea to put such things into your global .gitignore.

But keep in mind that you mostly work in projects with other people, so you have to put those things into your repositories .gitignore too, to avoid that your co-workers commit secrets.

Collapse
 
alyson profile image
aly quey

oh thank you. :) I care this.