TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Using git to manage a website

172 pointsby achew22over 14 years ago

13 comments

vebover 14 years ago
Is it bad, that I simply SSH into the server and do a "git pull"?
评论 #2187009 未加载
评论 #2186934 未加载
评论 #2188356 未加载
评论 #2188893 未加载
kevinburkeover 14 years ago
I use Fabric with mercurial to achieve a similar effect typing "fab prod deploy" - see Steve Losh's blog posts or bitbucket.org/kevinburke/goodmorningcmc
评论 #2187423 未加载
评论 #2187325 未加载
评论 #2187777 未加载
glenngillenover 14 years ago
It's probably worth checking out NestaCSM (<a href="http://effectif.com/nesta" rel="nofollow">http://effectif.com/nesta</a>) if you're interested in doing this.<p>Sinatra in front, but all your posts are managed by Git and can be Markdown/Textile/HAML (or anything supported by Tilt iirc). Push it to Heroku if you want easy/free hosting.<p>Takes care of publishing an RSS feed, tags/categorisation, and a bunch of other nifty things beyond just generating a static site.<p>Example: <a href="http://blog.peepcode.com/" rel="nofollow">http://blog.peepcode.com/</a><p>(disclaimer: I used to work with Graham who created it, but I genuinely think it's awesome and use it for almost every site I build now)
Pyrodoggover 14 years ago
I've been using Joe Maller's write-up[1] as a guide for a while.<p>I see this strategy removes the need for a second repo on the server. Other than removing a layer which would save space and lower the likelihood of errors in general are their significant pros/cons to either method.<p>[1] <a href="http://joemaller.com/990/a-web-focused-git-workflow/" rel="nofollow">http://joemaller.com/990/a-web-focused-git-workflow/</a>
georgecmuover 14 years ago
Can I use git to manage a Drupal-managed website?
评论 #2186989 未加载
评论 #2186979 未加载
soultover 14 years ago
That's similar to my private website (soultcer.com). I use git to create and store the content, and a wiki as content management system. It's nice to work on your website, and all you need is a git push for deploy. If I make a mistake or someone vandalizes the wiki, reverting is easy.<p>clickable: <a href="http://www.soultcer.com/" rel="nofollow">http://www.soultcer.com/</a><p>Edit: In case you are interested, the wiki software was written by a friend and is open source: <a href="https://github.com/patrikf/ewiki" rel="nofollow">https://github.com/patrikf/ewiki</a>
chalstover 14 years ago
The general approach of putting together your website on one machine, the coding machine, and publishing it to your server is one I use, although I prefer a complex build on my design machine and then rsync it with the server.<p>Checkout Chronicle (<a href="http://www.steve.org.uk/Software/chronicle/" rel="nofollow">http://www.steve.org.uk/Software/chronicle/</a>). I've put up a HN thread (<a href="http://news.ycombinator.com/item?id=2186798" rel="nofollow">http://news.ycombinator.com/item?id=2186798</a>).
jbrennanover 14 years ago
This is basically how I run my publishing engine (you can read more about it at the "Colophon" part of this article: <a href="http://nearthespeedoflight.com/article/about_the_redesign" rel="nofollow">http://nearthespeedoflight.com/article/about_the_redesign</a> ).<p>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.
评论 #2188004 未加载
dedwardover 14 years ago
I've played with this - in the end I ended up using custom scripts and/or Capistrano scripts (along with git of course) to handle actual deployments. It provided more control and more features, while still letting me leverage git.
评论 #2187457 未加载
truskoover 14 years ago
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.
评论 #2187841 未加载
buckwildover 14 years ago
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).<p>Living on the cloud has never been so easy :-D
评论 #2187860 未加载
评论 #2187490 未加载
评论 #2189066 未加载
评论 #2190152 未加载
boyterover 14 years ago
I do something similar, but I keep the "central" repository in another location on the server and pull from that.
评论 #2187467 未加载
JamieEiover 14 years ago
So in other words Heroku minus all that pesky code?