First of all it is maybe an already answered question but I did not find anything about that subject.
It is not an issue but a question about the best way to manage the file
config.php in Magento 2.
config.php is not versioned (by default in M2
.gitignore file) so it is not in our repository. The problem is when someone install the project he doesn't have this file but he already have the database so he can't run
bin/magento setup:install ... to generate the file.
We are aware that the
bin/magento setup:upgrade add non declared modules to
config.php but only if the file exists and the
bin/magento module:enable can add modules but we would like to avoid to launch that every time we deploy or install the project.
My question(s) :
- Do we have to remove
.gitignore and version it ?
- Do we have to add it the first time in the repository and let it in the
.gitignore after ?
- What is the best way to manage this file ?