Why don't you save all the environment-specific configuration files, mainly the repo? Then, during the build or deployment process, you should use any configuration file. There are many different ways to implement it, depending on your build / deployment tool, but by any means, I think it's best to have it in branches.
My opinion is that you definitely want the configuration files to be saved in version control and deployed using the deployment tool, so you would not have old versions that would freeze due to lack of updates or a manual error.
Usually there is a folder structure like
/configurations/test/properties/ /configurations/prod/properties/
and the deployment tool uses them for each environment on demand. Any sensitive information, such as passwords, can be either hashed or encypted: these technologies, such as secure storage, support this directly.
eis
source share