Deploying only changed part of a website with git to ftp (svn2web for git)

Posted by Elazar Leibovich on Stack Overflow See other posts from Stack Overflow or by Elazar Leibovich
Published on 2009-05-14T20:55:47Z Indexed on 2010/04/28 4:23 UTC
Read the original article Hit count: 372

I'm having a website with many big images file. The source (as well as the images) is maintained with git. I wish to deploy that via ftp to a bluehost-like cheap server.

I do not wish to deploy all the website each time (so that I won't have to upload too many unchanged files over and over), but to do roughly the following:

  1. In a git repository, mark the last deployed revision with a tag "deployed".
  2. When I say "deploy revision X", find out which files has changed between revision X and revision tagged as deploy, and upload just them.

It is similar in spirit to svn2web. But I want that for DVCS. Mercurial alternative will be considered.

It's a pretty simple script to write, but I'd rather not to reinvent the wheel if there's some similar script on the web.

Capistrano and fab seems to know only how to push the whole revision, in their SCM integration. So I don't think I can currently use them.

© Stack Overflow or respective owner

Related posts about deployment

Related posts about git