On Wed, Jun 06, 2007 at 08:18:45PM +1000, Jeremy Visser wrote: > A common method of doing this is giving the config file > that is in version control a filename with something like -sample or > -editme appended to the end of it. > > For example, WordPress' config file is named "wp-config.php". However, > if you go to <http://svn.automattic.com/wordpress/trunk/>, you will see > that it is actually called "wp-config-sample.php". > > The idea is that you checkout the repository, copy the > "wp-config-sample.php" file as "wp-config.php" and edit the copy. > > That way, the config file with the actual password is only local, and > never gets committed.
Or depending on your application I like to do something slightly different. I keep config.file in my SCM of choice (currently bzr). Config file has the standard default variable and also includes config-local.file to override any. I then create config-local.file with the settings I want. It's also a good idea to add it to your SCM ignore list to try and prevent someone accidently checking it in. Cheers, -- John http://www.inodes.org/ -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
