Live data from Hacker News

Using git to manage a website

toroid.org

31–40 of 52 posts

Re: Using git to manage a website

#31
post #29

Earlier quoted context omitted.

Managing the codebase is straightforward -- that's what git's designed for. My question was more about the actual site contents, which will reside in the database. Can you use git for tracking changes to the contents?

No, git will not track database changes. Features however can handle much of the configuration (that is typically contained in the database) in code, which can then be managed with git. If you want to create content on your dev or staging site and push it to production, check out the deploy module: http://drupal.org/project/deploy Tracking changes to nodes in production is probably best left to Drupal's built in node…

Great info, thanks!

Re: Using git to manage a website

#32
post #27

What about using git to backup an entire hard drive? Maybe using bitbucket (or github if you don't mind sharing your data with the world). Living on the cloud has never been so easy :-D

Performance would be nightmarish. Git is super elegant and great, but not very performant. Imagine having to deltify a terabyte of data? Good luck with that!

wasn't it because he needed better performance one of the reasons Torvalds created git? http://en.wikipedia.org/wiki/Git_(software)

Re: Using git to manage a website

#34
Have a question. This is nice for simple HTML. How about deploying site were you have to migrate the database etc. This approach wouldn't work. I use fabric with git right now, works well.

Re: Using git to manage a website

#35

Earlier quoted context omitted.

Not necessarily. If you run an ssh-agent locally and configure ForwardAgent to 'yes' for connections to your web server you can ssh to your server and use ssh from it without actually putting your private key on it. I'd still recommend pushing to a server though.

An excellent discussion about this exact topic came through HN yesterday. See http://news.ycombinator.com/item?id=2183415 , and in particular the comments.

Thanks for pointing this out.

Re: Using git to manage a website

#37
post #34

Have a question. This is nice for simple HTML. How about deploying site were you have to migrate the database etc. This approach wouldn't work. I use fabric with git right now, works well.

One solution that occurred to me, was to setup a(assuming MySQL)mirrored database. Another idea is to setup a MySQL dump script or something similar.

Just a couple of ideas :)

Re: Using git to manage a website

#38

What about using git to backup an entire hard drive? Maybe using bitbucket (or github if you don't mind sharing your data with the world). Living on the cloud has never been so easy :-D

You should look at something more along the lines of rdiff-backup (or whatever's fashionable these days) for that.

Using git would be pretty pointless, unless you're going to be frequently branching and merging against your mp3s or something.

Re: Using git to manage a website

#39
post #27

Earlier quoted context omitted.

Performance would be nightmarish. Git is super elegant and great, but not very performant. Imagine having to deltify a terabyte of data? Good luck with that!

wasn't it because he needed better performance one of the reasons Torvalds created git? http://en.wikipedia.org/wiki/Git_(software)

http://en.wikipedia.org/wiki/Bitkeeper#Pricing_change

Re: Using git to manage a website

#40

This is basically how I run my publishing engine (you can read more about it at the "Colophon" part of this article: http://nearthespeedoflight.com/article/about_the_redesign ). I wanted to teach myself Ruby and I figured this was a great way to maintain a site, as I'm terrible with both SQL and security. Git solves security and DataMapper solves the SQL, and my Ruby lubricates the rest.

You could use git directly for metadata instead of relying on some JSON file. Git will tell you when an article was created and by whom. It will also tell you when and by whom each edit was made.
Post reply on HN