One option is to leave this to the build / deploy process.
So, for Web.config you will have the following in SVN: Web.config (this may be your development version) Web.config.qa (if you have a qa environment) Web.config.prod
At the time of assembly / deployment, the deployment process βknowsβ to which environment it is being deployed (based on the fact that you control this - environment variables, script parameters, etc.) and replaces the correct configuration file in its place.
I prefer this method because it leaves your directory and file structure intact (and also has a configuration folder), and also avoids unnecessary branches and merging. This requires diligence to ensure that all files are updated when changes are made that are not environmentally specific, but you will pay this price regardless of strategy.
source share