News for hackers. Stuff that matters.
Re:Benefits of a Git-backed Blog by antonyme on Tuesday March 06, 2012 @05:35AM (#3670430)
I'm just about to switch over from MovableType to GitHub Pages http://pages.github.com/ . They use Jekyll http://jekyllrb.com/ to publish text, HTML or Markdown. So far it's pretty awesome.

The benefits of this particular setup include:

* all articles are under version control

* just do a `push` to publish

* easily run a local Jekyll server to preview articles

* use a real programmer's text editor (not some web form)

* Markdown is the best for tech articles

* write, preview and commit while offline

* code syntax highlighting

* integration of snippets (gists)

* variable layouts for different page types

* pages are static so are served fast

* easy to add comments with Disqus et al

* easily port your content anywhere

* keep images and other binary content alongside text

Which reminds me - dear $DEITY, when is HN going to support Markdown?!

Re:Benefits of a Git-backed Blog by jankins on Tuesday March 06, 2012 @10:02AM (#3671271)
Much more complete list than mine, ha. Pelican supports github pages as well, though I decided not to use github in order to learn git better -- which should have been the singular title of the article as it turns out ("benefit") but what the hell, sue me.
Re:Benefits of a Git-backed Blog by gravitronic on Tuesday March 06, 2012 @09:26AM (#3671099)
Oh hey, it's the article I expected to read when I clicked on the blog post
Re:Benefits of a Git-backed Blog by pilif on Tuesday March 06, 2012 @04:54AM (#3670338)
There is a simple rule of thumb about unix tools: when you are in need of a -f or --force parameter, most likely something is wrong and you should rethink what you are doing.

Even more so if the tool in question refuses to do anything unless -f is given.

That said, I'm glad to see that the OP took this as a learning experience and not as a reason for posting a long-winded rant about why git should be considered harmful

Re:Benefits of a Git-backed Blog by VMG on Tuesday March 06, 2012 @07:28AM (#3670702)
I'd say rm -f may be the exception - technically you could run a chmod +w before but you'll end up at the same place
Re:Benefits of a Git-backed Blog by emillon on Tuesday March 06, 2012 @04:45AM (#3670311)
> I started to get a feeling this wasn't right, and so I googled around for a way to undo the add.

At that moment, the easiest way would have been to "rm -r .git". As git stores all its metadata in that hidden directory, this is a safe way to undo the creation of a repository.

Re:Benefits of a Git-backed Blog by alexchamberlain on Tuesday March 06, 2012 @04:46AM (#3670314)
Sorry, but you didn'tblist any benefits, other than teaching you git. What about versioning your articles, distributed backups etc?
Re:Benefits of a Git-backed Blog by rcthompson on Tuesday March 06, 2012 @04:58AM (#3670349)
I wonder if this was posted more for the "how I blew away my home directory with git" anecdote than anything else.
Re:Benefits of a Git-backed Blog by beothorn on Tuesday March 06, 2012 @09:53AM (#3671229)
I'm beggining a github blog using jekyll. If anyone is interested, it is still a very basic and easy to understand setup. Also, I wrote a little script to write posts from the command line: https://github.com/beothorn/beothorn.github.com/blob/master/... Just change vim to your favorite editor.
Re:Benefits of a Git-backed Blog by karl_freeman on Tuesday March 06, 2012 @04:57AM (#3670347)
On a slightly related note. If anyone is thinking of moving over to Git / Git(hub) backed blogging. Don't count out Github's 'Edit File' ( http://ace.ajax.org/ ) editor online as I constantly find myself amending typo's, etc... Was for sure an added bonus.
Re:Benefits of a Git-backed Blog by EnderMB on Tuesday March 06, 2012 @08:33AM (#3670880)
Perhaps a bit off-topic, but isn't the use of post-receive hooks to publish your content effectively hacking Git to do something that it shouldn't?

For me, the ideal approach was always to use continuous integration to publish/build my site fresh every time I commit.

Re:Benefits of a Git-backed Blog by jankins on Tuesday March 06, 2012 @10:41AM (#3671468)
Not off-topic at all, I'd definitely like to hear more about this. I read a few 'use git to publish a live site' explanations, and settled on the post-receive hook because it was the first one to make sense to me and work, not because it's the ideal way to do it.
Re:Benefits of a Git-backed Blog by drivebyacct2 on Tuesday March 06, 2012 @05:22AM (#3670399)
Title says: "Benefits of a Git-backed Blog"

Blogpost describes: "Deleting all my files with git"

Conspicuously Missing: "Benefits of a Git-backed Blog"

Re:Benefits of a Git-backed Blog by EdiX on Tuesday March 06, 2012 @07:58AM (#3670777)
It seems that the benefit of a git-backed blog is that you learn to use git.
Re:Benefits of a Git-backed Blog by brown9-2 on Tuesday March 06, 2012 @07:18AM (#3670672)
read the last paragraph.
Re:Benefits of a Git-backed Blog by shearn89 on Tuesday March 06, 2012 @07:05AM (#3670639)
* goes to read post *

* comments on it on the blog *

* comes to HN and discovers people have already made my comments in the comment thread *

Great minds...