So I give you a suggestion, write a deployment script, the first stepclone,然后第二步就通过sed等做一些文件操作,比如修改config.php配置信息啦,本地开启debugla, etc. It is best to complete the local environment through the script with one click
You can rename config.php to config.php.example and add it to version control. When you need clone later, you only need to manually rename config.php.example to config.php, like this It can be personalized and let others know your configuration attributes.
I usually have two configs, one online and one for testing. The online config is imported by default and the entry file is manually modified locally. The entry file is neither submitted nor updated
This
config.php
肯定是要存放于git
上面的,至于git
上的这个config.php
应该是默认配置,每个客户端的config.php
里面的配置可能或多或少不一样,那需要每个客户端自己改,所以说默认的config.php
只应该有一个,只有需要修改默认配置的时候才需要提交config.php
的改动,否则不要git add
So I give you a suggestion, write a deployment script, the first step
clone
,然后第二步就通过sed
等做一些文件操作,比如修改config.php
配置信息啦,本地开启debug
la, etc. It is best to complete the local environment through the script with one clickYou can rename config.php to config.php.example and add it to version control. When you need clone later, you only need to manually rename config.php.example to config.php, like this It can be personalized and let others know your configuration attributes.
Refer to stackoverflow
I usually have two configs, one online and one for testing. The online config is imported by default and the entry file is manually modified locally. The entry file is neither submitted nor updated