TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Using git to manage a website

172 点作者 achew22超过 14 年前

13 条评论

veb超过 14 年前
Is it bad, that I simply SSH into the server and do a "git pull"?
评论 #2187009 未加载
评论 #2186934 未加载
评论 #2188356 未加载
评论 #2188893 未加载
kevinburke超过 14 年前
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 未加载
glenngillen超过 14 年前
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)
Pyrodogg超过 14 年前
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>
georgecmu超过 14 年前
Can I use git to manage a Drupal-managed website?
评论 #2186989 未加载
评论 #2186979 未加载
soult超过 14 年前
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>
chalst超过 14 年前
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>).
jbrennan超过 14 年前
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 未加载
dedward超过 14 年前
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 未加载
trusko超过 14 年前
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 未加载
buckwild超过 14 年前
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 未加载
boyter超过 14 年前
I do something similar, but I keep the "central" repository in another location on the server and pull from that.
评论 #2187467 未加载
JamieEi超过 14 年前
So in other words Heroku minus all that pesky code?