Git ignore certain lines of certain files?

Probably a rank neubaphile question to follow…

I offer the following scenario for suggestions. I have a dev and a production branch of a web site project. Several files have settings that are exclusive to each branch. Such as using different databases for each branch. I don’t want the settings to change (become equal) on each branch during a merge. My understanding is that git doesn’t accommodate this scenario because it’s “file based”. I can’t tag a line to be ignored in a merge?

Hi,

I am not sure if you can ignore some lines of a file check this it might help.

My advice to use a whole different file for each environment and use a deployment script to fill your parameters with the right values for each environment.

Hope this helps.

My solution:

if ( getcwd() == ‘/home/apache/htdocs/dev/daedalus/include’ ) {
PRINT <<<STYLE

STYLE;
} else {
PRINT <<<STYLE

STYLE;
}