EDIT: Or it's just small time developers who don't care about security and ship whatever works.
# Ignore everything
*
# But not these files...
!/.gitignore
!*.go
!go.sum
!go.mod
It’s the least shit solution, but it’s definitely a shit solution.
Npm has another way to default exclude but I don’t think git does, and if docker got one I don’t recall what it is.
Ah, makes sense it could get exposed then.
The pattern I've always followed is having `.env.template`, `.env.dev` or similar in SCM, then require the development setup to manually/automatically copy it to `.env`, which is .gitignore'd.
Seems that pattern might not have been as widespread as I thought :)
I will continue to use .envs. The alternatives invoke much more friction.
Just make sure that you gitignore the plain-text dotenv. That's the hard part (on a team)