I'm a writer—no programming, only prose in text files, mostly in Emacs org-mode, some in markdown-mode.

I want to implement a version control system for my writing projects.

I work with two types of text files:

  1. drafts (textfile-v1.org, textfile-v2.org, etc)
  2. research files (research-notes.org)

The latter, the research files, consist of hunks of text I have copy and pasted from the web. My workflow for the research files involves going through those files and deleting as I go. In other words, when I find a quote, I might copy it into a draft file, then delete the quote. This is my way of knowing what I have already processed or not. So that by the time my research file is blank, I know I'm done. When the research file is blank, I delete it so I know I'm done.

For both these uses—writing multiple drafts, and destroying research files as I go—it strikes me that having a version control system would be helpful.

I am NOT doing different branches as I go—just going forward as I make progress writing my book.

I'm using Aquamacs Emacs on OSX. Which version control system would you recommend, and how would I go about integrating it with my Emacs workflow?

  • The answers to this question might be useful as well: writers.stackexchange.com/questions/289/… – Lauren-Clear-Monica-Ipsum Feb 8 '13 at 21:28
  • Hi Peter and welcome to Writers.SE! How frequently do you make (or would you want to check in) changes? Since you're on OSX, does Time Machine help you or do you need something more granular? – Monica Cellio Feb 14 '13 at 22:24
  • 1
    I'd like to outline that version control is only for preserving history, it doesn't replace backup systems. If the drive where the repository dies or if there's any other problem with the repository the data might be gone. You have to backup your repository the same way as you would do with any valuable data. – sharptooth Feb 18 '13 at 12:51
  • 1
    I asked a similar question over at the Emacs stack exchange. The accepted answer provides a very nice introduction to Magit, which I am loving to use so far. emacs.stackexchange.com/questions/7826/… – Brian Z Feb 17 '15 at 6:33
  • 1
    You could certainly use them both together if you want to. Github has a nice GUI but I like that Magit is so well integrated with emacs. This way I can review changes and commit them with just a few keystrokes. I started using gitg sometimes when I want a GUI. I'm not ready to pay for private repositories on Github just yet, but I may try pushing to Bitbucket soon. I'm just getting started with version control but when I figure things out better I will try to post a full answer here. – Brian Z Feb 20 '15 at 3:06

There are a large number of version control systems out there, but I think that Git might be the best choice for you for a number of reasons. The biggest reason is that everything is in a single folder, you don't have to check things out to work on them or rebuild anything. You can just keep a full live copy on a pendrive and it just works. You also don't need to set up servers or magic paths.

In addition, you don't have to check anything out, you just commit it when you're done. You can also keep an offsite repository with very little work so you have that extra layer of protection. Another upshot of git is you can just backup the whole thing by just copying the root folder. Everything is copied over and will work just fine at it's new location.

I can't speak of how to integrate it into Emacs, but I suspect that part of the question can easy be answered at one of the other SE sites.

| improve this answer | |
  • 2
    Have to agree! git works very nicely from a single-user all the way to distributed team. There is some information about git and emacs here --- though I haven't used it myself (I tend to use it within eclipse). – Peter K. Feb 8 '13 at 23:39
  • 4
    You could also consider to set up a (private!) copy of your repository e.g. on BitBucket.org - you even can invite up to 5 others to participate in your work. This has the advantage that you do not need to maintain a separate backup copy, simply push all changes to the online repo. I am using BitBucket (as a programmer) with a very nice and comfortable to use (windows) client tool called TortoiseHg (with a Mercurial repo, similar to git). For Git, there are similar client tools. – Erich Schreiner Feb 12 '13 at 5:34
  • Thanks everyone. I've started using Git, using the GitHub UI, and a free private repository at BitBucket.org, and so far it's working great! – incandescentman Feb 16 '13 at 20:30
  • I must respectfully disagree. The ambiguous and vague syntax gives Git has a steep learning curve. This is especially true for authors who don't have a strong technical background. I have been using Git for two years. As a developer with 30 years of experience, I still find that Git has a tendency to turn a task that should take five minutes an all-day job. While Git is capable and can do the job, it requires an extremely long-term commitment. There is also an elevated risk of lost work and lost time on a regular basis. Obviously, Git has not made a fan of me. – Doug Kimzey Jul 29 at 17:47

As a coder and blogger I am using Git for version control. Actually my whole blog is run on it and I can recommend it a lot. As you are on Mac and do handle text files mostly, I'd recommend using the great github mac UI ( http://mac.github.com ) it makes it really easy to use and you don't even need any github account - using this as a free backup and sharing tool is highly recommend as well.

| improve this answer | |
  • 1
    I like SourceTree as well. – Peter DeWeese Feb 18 '13 at 14:28
  • Please don't link your own blog / work / site as it can be considered self-promotion unless it contains vital information for the answer. You can put links to your own sites in your profile though. I'm removing them. – Mindwin Jan 16 at 17:47

If you are using mac, you can try Drawers, which is specially designed for writers, use it to manage versions and copies of works. This way you don’t have to keep duplicating and renaming your files.

Drawers in App Store

| improve this answer | |

I have recently started writing with LaTeX in a version controlled git directory.

I use latexdiff to track changes between commits. This has the advantage of using an algorithm to track changes in a paragraph independent of line breaks, where for example only a single word changes, whereas git-diff would show the entire line/paragraph as having changed. I also use the LaTeX package gitinfo to embed git metadata into working documents. The hook requires manual configuration, but once you're up and running, it's nice to quickly verify the commit corresponding to the PDF you sent to someone for review, for example.

So, in total, the workflow consists of:

  • Git version control
  • LaTeX document preparation system
    • latexdiff package
    • gitinfo package

And I love it! It does everything I want it to do and the output is beautiful.

In the course of preparing a manuscript for submission to an academic journal, it may undergo all sorts of rearrangements, edits, expansions and contractions depending on the requirements of the journal. LaTeX is ideal for dealing with these sorts or rearrangements, especially when splitting the document into subdocuments by section (abstract.tex, results.tex, etc.). I tend to create a new branch for each journal submission. A document based on "my-dissertation-chapter" might have a new branch called "science" in which we reformat our article for Science magazine. After it was rejected, we created a new branch called "nature" to submit it to Nature instead, complete with the appropriate changes to the bibliography style, etc. This way, no informations gets lost. You can always go back to a commit/snapshot to recover whatever you might need. That beautiful paragraph you wrote but then deleted for space can be added back again when you resubmit to another journal with a more relaxed word count, etc.

The only issue is the learning curve for LaTeX and git to make all the parts work in concert. I'm not a developer. I don't even use vim. I prefer to use the TeXShop IDE provided in the MacTeX distribution of LaTeX to write and prepare my documents.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.