-2

We have 3 Ubuntu boxes - development server, git server and a webserver and work from a windows xp machine.

Is it possible to work on the development server, stage and manage files to push/pull from the git server, then deploy to the webserver once commited?

Any advice, greatly appreciated.

Jenski
  • 145
  • 3
  • 8

2 Answers2

3

I think better solution then cron job every minute, would be use one of Git Hooks, for other automated stuff i would use inotify tools As im going to do something similar in near future, was doing some research and found this 2 links as possible solutions. Hope this helps.

Frederik
  • 3,359
  • 3
  • 32
  • 46
-1

You could setup a cron job to run every minute to checkout the latest files in the repo.

That is how I am doing it with my subversion server - and it works great.

You just create an executeable bash file with the command to pull from the git server, and then add a line to the crontab with crontab -e:

* * * * * /path_to_script

This will make the script run every minute.

Frederik
  • 3,359
  • 3
  • 32
  • 46
  • Is there a client you can use to browse/manage these repositories remotely? I've tried Git Extensions and TortoiseGIT but I can't seem to get them to connect – Jenski Jul 12 '12 at 08:52
  • I assume you are talking about your ubuntu box? In such case, you should just install git via `apt-get` and it should do it. I haven't used git that much - so my experience is limited. – Frederik Jul 12 '12 at 08:53
  • Sorry - accessing/managing repositories from a Windows XP machine – Jenski Jul 12 '12 at 08:59
  • Github just launched their [own version if Git for Windows](http://windows.github.com/) - I dont know if it can handle your own git servers too, but give it a shot. Otherwise, [this thread on StackOverflow](http://stackoverflow.com/questions/157476/what-guis-exist-for-git-on-windows) seems to have quite a lot of answers – Frederik Jul 12 '12 at 09:08
  • Git has a complete hook infrastructure, there's no need to be bodging things up with cronjobs. – womble Jul 12 '12 at 09:49
  • Cool - I wasnt aware of that. Seems like a better solution than a cron job. – Frederik Jul 12 '12 at 09:50