开发者

Git: testing PHP script locally when connecting to a database

I am setting up Git and trying to use this. We have a development server, which holds all websites that we work on. Our projects use PHP, MySQL and Apache to function. This is all installed on the development server. However, my question is: how can I do testing on the local machines when I use Git? After all, I sync the projects and they all down开发者_如何学Pythonload to individual machines that do not necessarily have Apache/PHP/MySQL installed. Is the usual way to always commit and sync again with the development server, in order to test code? Feels rather inconvenient! Or is the common way to install local software just as on the server, so we can test without having to syncing every minute...?


I don't do PHP, but I would say never ever depend on a common dev server in this way!! To answer your question, yes, all the required services need to run on each developer's machine. To help alleviate problems that crop up due to per-machine environment deviations, take a look at Vagrant.

P.S. This isn't really a git question. It's just a general process question.


I think the best way to do this is maybe create a different branch called "dev-build" then have that sync on the dev server. The common way is to have non-public facing apache and mysql on your local computers

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜