Add ignored config file to git repo as sample

后端 未结 4 1449
-上瘾入骨i
-上瘾入骨i 2021-02-03 11:56

I have an repository for an app that I\'m working on that includes a configuration file. Currently, I distribute with a .dist extension, and have the user rename th

4条回答
  •  攒了一身酷
    2021-02-03 12:37

    This is a good question, but AFAIK there is no git solution for this.

    Few workarounds:

    • configure your app to read config.dist when config is not present (e.g. PHPUnit uses this technique)
    • use build script to do rename for you (e.g. ant or phing)
    • use git hooks to rename the configs

提交回复
热议问题