0

I am going to start a new project and I am going to have an Apache with two domains (one for testing, another for stable).

I am probably going to use Git, so let's say I use Git as version control. I want to synchronize the testing subdomain with the repository - that means, when someone commits to the eventual Git server, the testing subdomain is going to run the latest commit.

What is the right way to achieve this? Thanks!

Jonhas
  • 125
  • 1
  • 1
  • 9

1 Answers1

4

If you're using Github, then:

https://help.github.com/articles/post-receive-hooks

You'll need a script on your server which can do a git pull when it receives a notification.

Here's more: http://www.bram.us/2012/05/06/automatic-website-publishing-with-git-github-style/

And more: git / github and web server deployment configuration

Community
  • 1
  • 1
ccleve
  • 15,239
  • 27
  • 91
  • 157