tags:

views:

39

answers:

2

how can I set up a domain to mirror the files hosted on a git repository (github.com/nospampleasemam/dylanstestserver and dylanstestserver.com). The repository is of a website, so I want to host the files stored in the repository, not just mirror the files for download.

thanks!

A: 

From that web server, you can set a cron job to "pull" frequently.

tanjir
this looks like the simplest solution, but I can't quite seem to figure it out on my own. do you think you could walk me through it or point me to some references? I can't find anything that is making it clear.
Nona Urbiz
So you are not sure how to use cron?
tanjir
i tried adding a cron job 'git pull [email protected]/nospampleasemam/dylanstestserver.git' and made sure it's run, but I have no idea where the files are ending up? I've searched but can't seem to turn up anything
Nona Urbiz
tanjir
A: 

You can use a hook to checkout the repository at the server side.

(there is a typo on the linked page.... it is $REF, not $RE)

J-16 SDiZ
this looks like it could be elegant, but I'm a bit confused on how to implement it as I am using hostgator.com, and don't have shell access to the host, or at least, i haven't accessed it that way yet. should I try to use this approach over ssh?
Nona Urbiz
@Nona Urbiz: which os are you on?
J-16 SDiZ
im using ubuntu? the host is linux as well
Nona Urbiz
You can use the `post-commit` hook *on your computer*. Install `ncftp` package in ubuntu, and create a shell script `.git/hooks/pre-commit` to run `ncftpput -u username -p password hostname /localdirectory /removedirectory`
J-16 SDiZ