Config Files and Source Control

Environment specific configuration files can be a pain in version control. Especially when multiple developers keeps clobbering each other on updates.

At Elevator Up we use Subversion almost exclusively. One useful approach is to first svn:ignore each config file. With Rails applications I usually ignore:

Then I save specific names for the environments they are used in. Most times with Elevator Up applications we have at least 3 environments:

I append the environment as an extension to the file, and throw those into version control.

Then I either create a symbolic link to the file I want to use (or if in Windows environment, copy the file).

It may seem silly at first to have different copies of the file in version control, however I've found at least these benefits: