Skip to content

Are .env files meant to be source-controlled or not? #3168

Answered by vhvb1989
TWolversonReply asked this question in Q&A
Discussion options

You must be logged in to vote

.env is not expected to be ever committed.
As @christiannagel mentioned, azd is adding the .azure folder (containing all azd-environments) to the .gitignore.
In the future, azd should be adding a .gitignore inside the .azure folder. See: #2755

What if I clone my colleague's Azd-compatible solution from a remote repo; should I expect .env to be there, or is the expected workflow that I have to run azd env get-values to initialise my copy with the same config that they have?

A classic approach for using azd within a team is:
a) Every developer in the team would have their own azd-environment.
b) Then, the repo would have a CI/CD configuration to produce a staging version for the project.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by TWolversonReply
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants