Reputation: 293
I'm developing a Magento solution and have decided to use git and github for source control.
I have a local copy of the empty repository. We have a development (shared hosting) server with Magento now installed on, and a production cloud server.
I can't seem to figure out the most simple way to deploy the updates of my local copy to the dev and production servers.
I've always used FTP, which just seems so much easier than all the solutions I've looked at.
Any help appreciated.
On a site note, should I use three separate branches in github; one for local, dev and prod?
Upvotes: 1
Views: 2974
Reputation: 385
The simplest thing you can do is that add app/etc/local.xml in .gitignore file so it your db configuration of different environment will not effected on merge.
Then clone from master on each environment: local, dev and production. While working locally, you can create new branch for each new issue or enhancement. Commit and push your changes on that new branch, review (if committed by some other developer) the changes from that branch and finally merge it to master. Now on dev and production server run the following to get your local changes:
git reset --hard HEAD git pull origin master
Hope this helps.
Thanks
Upvotes: 2