My Git Book Writing Blog

Using Git for the Book (Part 1)

I plan to elaborate on this topic over at least two parts, and in more detail on my Tech BLOG (http://tech.rickumali.com). For this post, I wanted to describe at a high level how I use Git for this book.

I work over three machines (described in Book Blog #14). Each of those machines has Git installed. For the book files, I created the initial repository on my Windows machine, then pushed it up to a private repository on Atlassian’s BitBucket. The repo now contains almost 400 files, over almost 800 commits.

Since I’m the only contributor to this repository, my Git workflow is very simple. Whenever I start work on the book, I first run git pull. This synchronizes my working directory with the latest changes. Whenever I finish work, I run git push. This uploads my changes to BitBucket for use the next day.

In between the git pull and git push, I’ll perform the standard git add/git commit to save my changes. Whenever I upload code to the publisher’s system (Nuxeo), I tag the repository. I use three tags so far: CODE, SUBMIT, and V (for the table of contents). I add a number to each tag (I’m up to SUBMIT #50, for example).

In future parts, I’ll discuss using Git with MS Word files, and issues I’ve run into with this simple workflow (yes…even just by myself, I’ve run into issues).

Thank You for reading!