.env files ar not supposed to be versioned.
Eventually you can have a kind of .env.example which will allow freshly cloned repository to copy and rename to .env.example to .env
A software engineer that specializes in serverless microservices. I love creating helpful content about programming and reverse-engineering.
I am employed at Google; all opinions are my own.
.env files ar not supposed to be versioned.
Eventually you can have a kind of .env.example which will allow freshly cloned repository to copy and rename to .env.example to .env
Versioning is aimed towards production secrets / configs, not local development .env's if thats what your asking.
Regardless, versioning is useful for predictable / reproducible builds.