Is it possible to version control a PHP + MySQL + Apache project? And could it keep track of the changes in the database, like for example if I added a new table, can I possibly commit that?
Thank you.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is not normal to keep databases in version control. Some developers use a sqlite database for development so that it can be checked into version control, but this can lead to issues as sqlite syntax can be different from MySQL.
However, you can keep your database schema and migrations source control. Look at a projects such as mysql-php-migrations to get started.
There’s a good tutorial on using PHP with Git at http://net.tutsplus.com/tutorials/other/easy-version-control-with-git/ – this should get you started.