I have a Ruby on Rails application, which sends out emails.
In production, I want to use some X SMTP server, but in development I want to use some other SMTP server (thus my configuration file for the SMTP settings is different in the development and production environments)
So I need to maintain 2 configuration files (one file each for the development/production environments' SMTP settings).
As of now, I keep settings for Y STMP in a file on my development machine. I clone the production code from the github repo, modify the working copy with settings for Y SMTP and proceed. Then when I have to push changes to github, I reverse the process. It works, but I'm thinking there should be a better way?
What is the "git way" to handle this sort of "small differences" between development and production code bases?
UPDATE
Per @Mike Axiak, is this the flow that you mean: (presume for simplicity that I'm not using ln
, but using the copy
method)
Both are added to .gitignore
If this is what you meant, is there some way to automate the copying process via git?