Scrivener File on GitHub

THought I’d post a few notes about using GitHub as a way to track a Scrivener Document.

I started with this wonderful stub from GitHub

I pulled this down to use as a base for putting my own Scrivener based project up in my own repository.

I successfully created a local repository and got the scrivener connection working but had problems getting it back up here on GitHub in my own place. Everything I tried wanted to make changes to eh Master Branch at carsomyr’s repository.

So the fix for that slight problem is this:

You have to create an empty repository here on Github first and then edit the config file in your local repository to point to the newly created but empty repository on GitHub.

I edited the line url =
in the config file by replacing carsomyr/scrivener_starter with my Username and the name of my newly created repository.

I am on a Mac and I then used GitHub for Mac to make the connection and manage the commits as I edit my Scrivener file.

So far it’s working well.

I’m using Scrivener to write the documentation for my open source sheep flock management software LambTracker.

Heeeeeyyyy . . . do I know you from somewhere, oogiem? :wink:

I assume you know not to try and merge two scrivener projects, right? Because of how the .scrivx file keeps up with binder names vs. how Scrivener creates numbered .rtf files which can be entirely different documents in two versions of the same project?

I’ve seen a couple of people assume that they could collaborate with someone else using Github as a proxy, but merging two branches of the same project can spell disaster if you’re both creating new binder entries.

Yeah I suspect that merging will be an issue. But in my limited testing as long as the binder entries are not added to then you can merge. I’ll do more testing but it seems to be working that way.

What I’m doing is assuming that I, as the master, will control all binder creation tasks but others appear to be able to edit the individual pieces and I can merge them.

However, I only did one simple test, not very extensive so YMMV.

Yeah I think so, Black Sheep and all :wink:

Is this the only way to do collaboration with a Scrivener file?

This has been discussed fairly extensively in these forums. It would be worth doing a search using, say, the term “collaboration”. One thread you’ll turn up is this one: [url]On Line Version??], which is worth reading all the way through. In that thread, it’s pointed out that “serial collaboration” (read the thread for a definition) is already possible - and not necessarily using GitHub. But that’s perhaps not what you’re seeking. You may mean “parallel collaboration”.

One potentially limiting or complicating factor is that a Scrivener “file” isn’t in fact a file - it’s a folder containing possibly hundreds of files, all of which contribute to a single Scrivener “project”. Getting all those files to “work” together if being amended simultaneously in separate locations would increase the difficulty of “parallel collaboration”.

Oogiem :

It is good to see someone else using a Distributed Version Control System for their Scrivener work. I was doing the GitHub thing for a while, but I decided that I did not want anyone, including GitHub, to have access to my work.

I ended up setting up Git on my local machine at home and my laptop. I also created a bare repository on my home machine. I do pushes and pulls to this from my desktop, and I can do the same with my laptop by remoting into my home machine using DynDNS and Cygwin from anywhere that provides an internet connection. I even use Sourcetree to do my pushes and pulls.

I have to say that having 0% worry about losing my project is such a relief, as is the capability to not only retrieve a backup, but to retrieve a backup from practically any day in the past.

The tradeoff is that it is a fairly complicated process to set up. One day, I will write a clear tutorial.