git - Branching: different config files for release/development -


i've inherited project , using git. have number of environments (dev, test, prod). previous team recreated on each instance, using same accounts, passwords, sid, etc. thing changed hostname mappings in /etc/hosts. connect different database server.

now, creates problem, because can't, example copy schema developer can run experiment using same database instance main development server. have create new database instance on host, , change /etc/hosts point new server.

while working setup, i'm trying find way maintain different config files each instance. ie: different versions of applicationconfig.xml depending on branch. i'm guessing 1 argue keeping database credential in repo not such great idea, lets ignore second.

another situation might warrant having different version of file debugging. i'm using javascript logger framework, , add debug code wouldn't want ship production release. don't want have add logger stuff when developing/testing , remove again before releasing. 1 might forget it.

what's proper way deal different "versions" of file different branches? there way have branch remains in sync latest code on master, few config/code files changed? don't expect remain in sync automatically, i'd able not merge config files (or parts of them), while not ignoring them (?). example: don't merge lines 6,7 (db username , password), merge other changes files.

it sounds should read on git attributes. check out section @ bottom of page

this helpful if branch in project has diverged or specialized, want able merge changes in it, , want ignore files. have database settings file called database.xml different in 2 branches, , want merge in other branch without messing database file.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -