Automatically pulling on remote server with Git push?

Posted by Vernon on Stack Overflow See other posts from Stack Overflow or by Vernon
Published on 2010-03-08T08:27:39Z Indexed on 2010/03/08 8:36 UTC
Read the original article Hit count: 289

Filed under:
|
|
|
|

Here's what I'm trying to do:

I have a GitHub repository, a portion of which I'd like to make web viewable. Right now I've cloned the repository on my own server and it works well, but in order to keep it up to date, I have to manually login and pull the latest changes.

I'm not sure if this is the best idea (or the best approach), but I'd like the remote server to automatically pull whenever someone pushes to repository. GitHub makes it easy enough to run a script when someone pushes, but I'm not sure how to pull once someone does that.

I was using PHP for simplicity, but just doing something like git pull naturally doesn't work because of permissions. Is this a bad idea or is there another way of achieving what I want to do? This seems like a common set up, but I wasn't sure.

Thanks.

© Stack Overflow or respective owner

Related posts about git

Related posts about github