Using Git as an Author: What I’ve Learned So Far

For the non-coders out there, Git is a technology for version control. It allows developers to track every change that was made to their codebase so that they can keep their code consistent; it forces a decision to support every change, helping to prevent the onset of bugs. It’s got a serious bunch of other great advantages too, but I think that’s the important bit for this post, at least. If you’re more interested in the software, there’s a great intro at Code School.

When I began my latest novel, I wanted to find a way to really control what I was doing, and given my experience as a developer and using git, I thought “Why not?” Git deals with everything on a line-by-line basis and that would be perfect for plain-text writing.

I’ve been using git for a while now and I’ve learned some things about how I write, and how I could write. It’s been quite a fun and enlightening experience.

Couple of terms you’ll probably need before you read on.
A ‘commit‘ is when I confirm and approve what I’ve written; this process usually uploads it to the repository. A ‘repository‘ is basically like a cloud storage facility specifically for your git project. A ‘diff‘ is a line-by-line list of everything that’s changed between some commits. A ‘branch‘ is a completely separate version of your project that you can play around with.

1. scatterbrain

Git tracks your every move within your writing directory, and the picture it’s painting of me is that I’m a complete scatterbrain when I write. So I know that I’ve changed a line in Chapter 8, 12, 1, 3 and 4 in a small 20 minute writing session. I also know that when I display this kind of behaviour in my commits, that I don’t feel fulfilled.

2. focus Looks different

I suppose this plays directly into point number 1. If I’ve made a scatterbrain commit, then I feel unfulfilled and my story hasn’t progressed much. However, when I’m into the meat of a chapter and I’m really focussed, I only touch the one file in the entire session. This shows clearly on the diff; I can see only a single file that’s changed and it’s one humungous change.

3. Track Down Ridiculousness

Sometimes I write a sentence/phrase/paragraph, which makes complete sense… at the time. With the benefit of hind-sight, these sentences/phrases/paragraphs are stupid and they don’t work. As git is able to keep track of everything you do, it has a tool called ‘blame‘ which allows me to find when, and in what context, I added that pesky line that makes no sense. It allows me to play detective in my novel, where I am the victim and also the perpetrator; tracking down leads and finding out what the hell I was thinking. I mean, it may not been correct, but I added it for a reason… right?

4. Risk Taking is the future

Taking risks is not something I do unless a) I have to, or b) I can easily pretend they never happened if/when they go wrong. Git helps me satisfy the latter, I can make use of branches in my project to try things out, and if they don’t work, I don’t have to merge that branch into my main one.

You usually have a ‘master’ branch for your project (by default) and any other branches are derivatives of it. If you decide to branch, and you’re happy with your changes, you can merge it into your master, and thus it becomes part of your project.

This level of freedom to ‘try things’ gives me a more experimental attitude, and as such allows me to reach new creative heights.

5. Control = Confidence

Git is version control. That’s what it does. It allows me to see a list of all the previous ‘versions’ of my story and easily view them on a change by change basis. It always makes me feel substantially more confident with my edits when I know that I have such a safety net behind me. I can always use diffs to find any errors I may have unwittingly written.

Bonus: It helps with translations

A good friend of mine, Dayle Rees, author of a few brilliant ‘development handbooks’, contributed this one. When he writes, he writes fluidly, releasing often with enacted and resolved errata, and sometimes even expanding to include new content. His use of git is hugely useful when it comes to maintaining not only his own book, but the translations of those books. When you’ve got multiple translators on-hand ready to help your book reach different markets, making regular updates is often not a healthy workflow, but with git, it is. It shows the translators exactly what changed in each release of the book, and allows them to do a better job at translating with focus.

Purchase his books to show support of what he’s doing. I personally recommend PHP Pandas and Code Bright

In Summary

The tool has been invaluable and it has, as such, insinuated itself into my creative process. Analysing and assessing my processes has become my norm in my profession as a coder, and it felt completely natural to enact those processes onto my hobby of writing as well. It feels good to be in control.

Advertisements
Using Git as an Author: What I’ve Learned So Far

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s