web.config and app.config machine-specific settings in git

后端 未结 5 1938
春和景丽
春和景丽 2021-01-30 13:47

We have multiple teams of developers in different offices, and they need different values for a number of configuration setting in our projects\' web.config and

5条回答
  •  隐瞒了意图╮
    2021-01-30 14:06

    Did you consider a content filter driver?

    content filter dfriver

    That would mean, on each git checkout, the smudge script would generate the actual config file based on:

    • a config template file (with config value placeholder like @@A_PARAM_VALUE@@)
    • one of the config value file (each developer can keep versioned his/her own config file values)

    That avoid any merge issue and gitignore settings: each "config value files" are different and remain separate.
    This is also compatible with other config generation solution like ConfigGen mentioned in pms1969's answer.

提交回复
热议问题