Git for Writing or other Non-Coding Projects?

Does anyone use Git for writing prose or other non-code projects?

I am curious to hear stories of its use. I suspect Github is a much under-utilized tool.

I am particularly thinking if I should start using it as an additional backup or versioning tool for documents I write and either need to keep long-term or need to work on in multiple computers. Does Dropbox make the most sense or Github Desktop?

I know Iā€™ve heard Merlin Mann discuss doing this on the Back to Work podcast. I donā€™t have specific episodes to point to, but Iā€™ve heard him talk about a few times, probably all within the past year.

I do use it for blog posts as a versioning tool and because my blog system that I built leverages a lot of the versioning meta data available with git. For non-developers though, I feel like it might be a bit overkill. For one thing, if youā€™re not writing in a plain text format (like Markdown), then the diffing tools for comparison or collaboration become unusable.

Iā€™d also check and see what the use-case is for choosing git. If itā€™s for collaboration with others (e.g writing a book), you need to make sure the others are familiar with it and comfortable with it as well. If itā€™s just for yourself and maintaining multiple versions of files, Dropbox may be a better option.

3 Likes
2 Likes

So long as you are writing in a plain text format (such as Markdown), Git works well. However, there are some limitations to be aware of. Here are some excerpts from my comment in a previous discussion about this:

1 Like

Iā€™ve been curious about this for a while, but Iā€™m still a bit scared of the steep learning curve ā€“ not sure if itā€™s worth it. Iā€™d like to have more sophisticated versioning for the content that I write, but not sure whether GitHubā€™s an overkill for this.

For reference, Federico discussed his collaboration workflow which relied on GitHub and iA Writer (and Working Copy on the iPad) back in 2018 and Iā€™ve been GitHub-curious ever since:

1 Like

A source control system like git is not worth the effort unless you are a programmer doing line-oriented coding (especially in a team of programmers) or a writer who is part of a group of writers all of whom use plain text. And with the group of writers youā€™ll need a highly technical person who cares about the accountability provided by such a source control system and who can help the other writers make best use of it.

For a solo writer using a Mac, you will be well protected by the Macā€™s document model (in place since macOS Lion) which gives you access to versions of your documents. Then add in Time Machine backups which gives you a second set of document versions.

3 Likes

Iā€˜m using git for versioning and also synching all my documents.

On a server I have a bare git repository (means not checkout files, just git internal stuff) on my Mac I have a clone of this repository and can change/add/remove files and push changes to the server. So I can see a history of changes and can go back in time etc.

Same on iOS using the Working Copy app.

Works really really well and no server software needed besides SSH.

If I would not use it for syncing stuff, I absolutely would store all my important files in a local git repository or multiple.

What kind of work do you do? Do you collaborate with a group of people, sometimes working on the same document?

For what I mentioned I do not collaborate with others.
This is just for me versioning documents like receipts, taxes, insurance docs, notes. etc.

I used this for my thesis when I was writing my PhD, as I found it was helpful to be able to resort to an older version if I needed to. This was using LaTeX however, rather than Markdown and I had hard set wrapping to 80 characters.

Background: Iā€™m a technical writer, and everything I write is under version control. Currently mostly Perforce (P4), but also git/GitHub.

Advice: Unless you have a specific, concrete, well-defined reason for using git/GitHub for managing your writing, you should avoid it.

Ignore if: Youā€™re a developer (or other person) whoā€™s been using git for a long while, and have absolute confidence in your skills and workflows of using it.

Why: Git and GitHub are going to introduce complexity and friction into your writing workflow. Even the difference between two version control systems (P4 and GH) can be enough to trip you up. (Iā€™ve seen it happen to dozens of writers at this point.)

Iā€™ve been using git and GitHub for 10+ years, for other things, and I hate using it for writing. Not because I donā€™t understand it, but because I spend too much time managing PRs and other engineer-oriented workflows. (Managing edits/feedback is especially frustrating, for reasons explained by others in this thread.) This is time that I lose my focus on the writing part of my job, the part I like most, and thatā€™s frustrating.

If you really need version control, especially if itā€™s for collaborating with others, then GitHub can do the job, and you can learn to use it. Donā€™t let me scare you!

But unless thatā€™s the case, adding GitHub or git to your writing process sounds more like procrastination on your writing than something to seriously consider. :wink:

5 Likes

This specific problem can be workaround with a really good diff tool - expect to pay $$. A good diff tool will highlight down to the character where the changes are. I assume a tool like BeyondCompare would do it.

Questions that you havenā€™t answered:

  • Is your writing plain text only?
  • Are you willing to pay dropbox for itā€™s packrat history function?

Also I assume youā€™re distinguishing between Git and GitHub.

Cheers
Mark

Interesting idea @mlevison - does BeyondCompare or other software integrate easily with Github or Github Desktop?

No, my writing is not plain text. But my intent would not be to do line-level pull requests; I would simply want to use it for versioning of complete documents. I donā€™t think it matters if I use plain text for that purpose as long as files are under 50-100 Mb. Am I wrong there?

I do have Dropbox already for other reasons. Iā€™m not really a fan of how their versioning works.

Looking at the settings Iā€™m surprised that there is no obvious place to select diff tools. When I cared about this more deeply, I used a GIT tool that allowed to choose my own diff tool.

(I assume that you know that you can use any Git tool with GitHub).

As usual it depends. I went down this rabbit hole until about 2015 when I ran out of space in that repo and gave up. GitHub was going to force to use GitLFS and I didnā€™t put the effort into understand if this was a good idea.

I did use Git to store & version writing and training materials for a period of 4-5 yrs. Over that time, I worked with two assistants, neither of them is a developer. My learning. When we code, two people can work on a file at the same time and most merges are easy. When work in word documents that doesnā€™t work so then version control is much more like the RCS/CVS days - ā€œHey Mark you have a lock on that file, when will it be released?ā€.

I gather there is a diff tool out there that will diff word, powerpoint and maybe even excel spreadsheets. I never spent the $$$ on it, as it I found it after I abandoned the model.

So in theory I agree with you about wanting something like Git, for non text files. In practice I gave up and just returned to Dropbox - which is ok for a team of two.

Iā€™m always looking for the ideal tool: simultaneous editing by multiple people (like google docs), version control with character level diffs (git + BeyondCompare), files that live on my disk so I can always find them. There are a few browser based tools Iā€™ve seen, none feel as effective as MS Word and Track changes.

4 Likes

Do you maybe have a too narrowed look at git? Before I started to look into it (some years ago) I had no idea that thereā€™s a difference between GitHub and git, I actually didnā€™t know git exists, as I always read about GitHub but never about git. Learned about git via DanThomasā€™s post at the Keyboard Maestro forum:

I use Git (note to readers: Iā€™m talking about Git , not GitHub.com).

(@DanThomas at Keyboard Maestro forum)

If youā€™re willing to spend money for a nice GUI app then take a look at Fork.app. Never used it with GitHub (because I donā€™t need GitHub) but it should work well, I guess.

If youā€™re interested in seeing diffs of non-plain-text documents in e.g. Fork.app then thatā€™s possible via textconv:

Performing text diffs of binary files

Sometimes it is desirable to see the diff of a text-converted version of some binary files. For example, a word processor document can be converted to an ASCII text representation, and the diff of the text shown. Even though this conversion loses some information, the resulting diff is useful for human viewing (but cannot be applied directly).

The textconv config option is used to define a program for performing such a conversion. The program should take a single argument, the name of a file to convert, and produce the resulting text on stdout.

(Git documentation - gitattributes)

Such conversion tools can also be used in Beyond Compare.app.

Git is very useful, but depending on your use case (e.g. whether you want diffs of specific file types) it takes a little bit time to set it up. But itā€™s all doable and really a one-time-setup-and-then-forget thing.

For you and other readers, donā€™t fear git! Hereā€™s what DanThomas (a former professional developer) wrote about it:

Also, extensive knowledge is NOT required, which is a good thing, because I donā€™t possess it! (At least, not for Git.)

(@DanThomas at Keyboard Maestro forum)

1 Like

Fork and Beyond Compare look interesting - thanks.

I was aware of git as a concept, but I thought most of the options other than Github were command-line only. Iā€™d much rather pay for a nice GUI app than have to deal with the command line; Iā€™ll do the latter when necessary but really prefer not to.

1 Like