The Context

git is this version control system that's designed to be used in a distributed manner, and supports a very divers and non-linear workflow. While it's designed to support the work of software developers--particularly in large projects like the linux kernel--at the core, git is just a file system layer that has an awareness of time and iteration. It also does its magic on any kind of text files... code or writing. I use git to manage a lot of my writing--indeed, most of my digital life, which is a bit weird admittedly; and as a result people on the Internet, not to mention my coworkers,come to me with git questions from time. This post is a response to a more recent change.

How I Work

I have two kinds of repositories: general repositories which store a bunch of different kinds of files that I need to work: the general repositories that store files that I always need to get things done, and specific project-only repositories that only have the text (and possibly notes) for a very specific project. I also have a "writing" repository where I do drafting for the blog, and start writing projects that I'd like to version, but are too small yet for their own project repositories. The brief overview:

  • garen is like my home directory within my home directory, and it has config files, scripts. and other daily essentials.
  • org stores my org-mode files.
  • fiction projects: I have five repositories in ~/ that store fiction projects, that I'm theoretically working on in some capacity, though I haven't touched most of them regularly.
  • writing holds blog drafting, and a couple of not-exactly-fiction, projects that I'm not quite ready to admit exist.
  • website content: wikish, tychoish.com, cyborginstitute.com, the cyborg institute wiki and a few other website projects that I'm involved with have repositories to store their content.

The lesson here, about repository organization, is that git wants you to have distinct repositories for different projects. Its possible to merge repositories together (really!) and also to separate the histories of specific directories into their own repositories if you're so inclined.

I write in emacs almost exclusively, I sometimes use magit, which is a delightful interface to git that works within emacs in a very emacs-centric way. If you use dired, magit will be familiar. Having said that, I mostly just add files, make commits and push repositories. Although I've been very interested in flashbake for some time, I've never really used it: it seems designed for people who aren't used to version control or git, and the fact that I am means that it feels cumbersome to me. I suppose I should take this as a challenge, and attempt to hack it into something more usable from my perspective, but I've not felt the urge yet.

I use gitosis (but it's in the debian repositories) on foucault (my server) to manage the publication of my git repositories. I push regularly, both to make sure that all of my machines are up to date, and also as a way of keeping my systems backed up. While I don't take snapshots of my systems, I've been able to set up systems and been up and running inside of ninety minutes after reimaging a laptop without loosing a single bit. Although unorthodox, git is my backup strategy, and the restores work fine. I strongly recommend having your own git hosting set up. It's not difficult, and while I think git hub is awesome on it's own terms, independence and self sufficiency is really important here.

I don't really take advantage of any branching and merging in git, though I've played with it enough to know how it works. I do have a branch in the repository for the novel I'm writing for an editor to be able to edit the novel as I write on it without needing to see their changes and comments until I get to that point.

And that's sort of it. I use jekyll (or an old personal fork) and soon to be cyblog) as well as ikiwiki to publish content, but other than that, I just write stuff.

In any case, if you have thoughts on the subject I'd love to see your input on the wikish git writing page.

Write on!