Sonia Hamilton wrote:
> I'm using subversion for development on a website. On my laptop, the 
> file that points to my local mysql database is different from the 
> production version; apart from that I want my laptop and production 
> version of all other files to be the same (except of course when I'm 
> doing dev work locally).
> 
> To handle this I've created a branch called "laptop" - is this the 
> "right way" to do things, or is there an easier way? What I'd like to
> be able to do is just "pin" this one different file, and do an "svn
> commit" that commits all my other changes, rather than having a
> separate branch.

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.
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to