[Cialug] git in structured environment

Matthew Nuzum newz at bearfruit.org
Wed Jul 9 12:05:48 CDT 2008


On Wed, Jul 9, 2008 at 11:05 AM, Colin Burnett <cmlburnett at gmail.com> wrote:
> git was intentionally designed to be distributed and it does
> that well.  However, this means there are immediate problems when
> wanting to use this in a structured environment
> when you want a copy of all code on a
> designated machine (notably for backup purposes).  That can surely be
> achieved by pushing changes to the backup server but seems wide open
> to forgetting to do so.
>
> Does anyone use git in a structured environment or know/seen/read of
> any solutions?

I use bzr (another distributed vcs) in a structured environment
somewhat like the days of svn/cvs. There is a central place to push to
and everyone puts their code there. We only push when we've tested and
merged in others' changes.

I have a plugin for bzr that is along the lines of what you mention...
when I do a bzr push to an sftp: location it follows up by
automatically doing an ssh into the remote location and doing `bzr
update .` in the remote folder, effectively checking out a copy of the
most recent revision directly. This allows testing or uploading files
to a website using bzr.

If git allows plugins then something along those same lines could be
done for your environment. Whenever someone pushes it would perform
some batch action.

(there's also cron of course...)

When I used CVS I created scripts that would send emails and update
rss feeds/change logs when commits happened. dvcs obviously don't do
that so the only way I know of is to use a plugin or cron.

-- 
Matthew Nuzum
newz2000 on freenode


More information about the Cialug mailing list