Is there a way to securely check in sensitive variables into git?

42 Views Asked by At

I have a bunch of variables in a .env file locally with all of my applications configuration, lets say this configuration works, as of a particular commit.

.dockerignore and .gitignore files are used to exclude this file from commits and builds.

Basically, if something goes wrong, I want to be able to revert back to a previous commit and the .env file at the time of that commit.

Is there a secure, efficient and seamless way to do this?

0

There are 0 best solutions below