标签云

微信群

扫码加入我们

WeChat QR Code


I use this approach, I just have a main.php.tmpl and when I checkout a new copy just copy it to main,php. I add the main.php file to the ignore list to avoid commit it by accident.

2019年01月23日53分31秒

+1 absolutely for stressing that configuration should still be versioned

2019年01月23日53分31秒

And if username is not reliable for whatever reason, then you can have a single file with only one line giving the name of the override config file. This way, there is very little (as in about 10 characters or so) which are not version controlled. And the README file could explain that you need to make that file.

2019年01月23日53分31秒

doesn't account for different env setups though right?

2019年01月23日53分31秒

This works extremely well if there are only a few difference between the environment (ie connection strings)

2019年01月23日53分31秒

and assuming there are not 100s of developers all putting their customized settings there as well (it would still work, but be very cumbersome)

2019年01月23日53分31秒

But when the developers testers push into the mainline, their changes to the template file will be pushed in as well. No?

2019年01月23日53分31秒

Unless there's a solution to Nick's comment, this will not work from what I see. Or maybe explain what flow model you're using which would solve the issue.

2019年01月23日53分31秒

I agree with the template approach with any necessary adjustments baked in at build time. However on the branching topic... What if there were multiple templates (dev, test, etc.) and developers simply omit changes from their commits. Not foolproof but could work with cooperation.

2019年01月23日53分31秒

Noumenon updated the answer to clarify

2019年01月22日53分31秒