

Using Git to Maintain Your Website - edw519
http://danielmiessler.com/blog/using-git-to-maintain-your-website

======
ryanwaggoner
Hmmm...interesting, but it seems like this takes automation a bit far. I also
use Git as a single developer on a project of mine, and I have staging and
production environments on my server, but I have simple deployment scripts
that I run to update the changes on the server, clear any cache files, etc.
It's not that much more complicated than what he does here, but it gives me
the peace of mind of knowing that I can commit my changes without the world
seeing them automatically.

~~~
fizx
Presumably, he works in a branch.

~~~
ryanwaggoner
Actually, if you read the post, it's clear that he doesn't, unless he stripped
all that out for the purpose of simplicity when explaining. But that's my
whole point: doing this the right way is hardly more complicated.

------
mpk
I used to use svn, but these days I use git for maintaining static websites.

Maybe I missed something in this article, but the key to static websites (as
far as I see it) is using a templating system. Put your templates, content and
configuration under version control and you're pretty much done. The website
itself is a generated artifact.

------
bravura
Or, use ikiwiki (<http://ikiwiki.info/>). It takes your git repository, a
directory hierarchy of Markdown files, and will automatically compile them to
HTML each time you push. Even more elegant.

------
yangman
I do something similar with my site, but without the extra intermediary
repository. On a push, the server-side hook simply hard resets the content of
the folder to the tip of a specific branch. The website itself acts as the
canonical repository of, well, itself.

[http://yangman.ca/blog/2009/08/06/website-management-with-
gi...](http://yangman.ca/blog/2009/08/06/website-management-with-git/)

------
jamesbritt
The Ruby Best Practices blog (blog.rubybestpractices.com ) uses a a git-based
system that's quite nice.

<http://github.com/sandal/korma>

I wrote up some background on it here:
[http://blog.rubybestpractices.com/posts/jamesbritt/2009-04-1...](http://blog.rubybestpractices.com/posts/jamesbritt/2009-04-13-solving-
the-problem.rc.html)

------
woid
these days I use github+github pages, even although I wrote
<http://drydrop.binaryage.com> ;)

------
KevBurnsJr
I have a very similar setup with post-receive deploys on remotes "stage" and
"production".

git push stage master

click around staging environment to make sure nothing's broken

git push production master

you're live.

------
known
Using CVS to Update a Web Site

<http://www.kegel.com/cvs.html>

