Suppose we have a config file with sensitive passwords. I'd like to version control the whole project, including the config file as well, but I don't want to share my passwords.
That could be good, if this config file:
database_password=secret
foo=bar
becomes
database_password=*
foo=bar
and the other users of the vcs could also set up the password on they own. To ignoring the file isn't a good approach, the developers should be aware, if the config file changes.
Example:
Local version:
database_password=own_secret
foo=bar
config file in vcs:
database_password=*
foo=bar
Then suddenly, the config file changes:
database_password=*
foo=bar
baz=foo
And the local version would become for each developer:
database_password=own_secret
foo=bar
baz=foo
This is my solution. How could I achieve this behaviour? How do you store your config files? Is there a way to do that, or should I hack something?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…