How do you deal with configuration files in source control?

前端 未结 19 2000
情书的邮戳
情书的邮戳 2020-11-27 13:00

Let\'s say you have a typical web app and with a file configuration.whatever. Every developer working on the project will have one version for their dev boxes, there will be

19条回答
  •  渐次进展
    2020-11-27 13:41

    What I've done in the past is to have a default config file which is checked in to source control. Then, each developer has their own override config file which is excluded from source control. The app first loads the default, and then if the override file is present, loads that and uses any settings from the override in preference to the default file.

    In general, the smaller the override file the better, but it can always contain more settings for a developer with a very non-standard environment.

提交回复
热议问题