I have a .env file storing my database information, and I'm about to publish my project on GitHub. So, my question is, should I commit an empty .env file with the keys that I need, but without the values so other people can understand how to fulfill it (and may later add it to the .gitignore file)?
For example, if my .env file looks like this:
DB_HOST=localhost
DB_USER=root
DB_PASS=s1mpl3
Should I commit it like this or just don't commit it at all?
DB_HOST=
DB_USER=
DB_PASS=
Thanks in advance.
You should commit, but with another name, like .env.example.
With that empty env, another team member can know how the env looks like and can fill in by themself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With