I keep important settings like the hostnames and ports of development and production servers in my version control system. But I know that it\'s bad practice to kee
This is what I do:
The template files contain a placeholder for the secret, such as:
my.password=##MY_PASSWORD##
On application deployment, script is ran that transforms the template file into the target file, replacing placeholders with values of environment variables, such as changing ##MY_PASSWORD## to the value of $MY_PASSWORD.