version control suggestion

I’ve been thinking about version control and scrivener. I’ve used a few version control systems in my working life, and with my writing I’ve used CVS and now GIT to keep control of versions, plus assorted back up copies of files.

Using version control requires discipline, and not everyone has that. Good version control systems are full blooded apps in their own right, and not something to be shoehorned into an existing app like scrivener. However, a lot of people would be happy with a simple, workable version control system built into scrivener.

Some basics:

  • it must be easy to use
  • it should allow you to take a disciplined approach to creating versions, and not just version each time you save.
  • it should allow you to compare different versions, preferably allowing you to use a third party diff tool
  • it’s different from snapshots (should allow those too)

So here are my suggestions:

  1. every time you open a project file, scrivener should allocate a new version number.
  2. create a versions folder under the project folder, and under that create a folder named from the version number (eg V00001), that will hold original copies of modified files.
  3. copy the project file there immediately.
  4. when ever a file is to be saved, check to see if there is one with the same name in the version folder. If not, copy the existing original there before saving.Only modified files have versions created, so it’s nowhere near a space hungry as snapshots.
  5. when you close a project, that terminates the version, and next time you open it a new number is allocated. So you can control when versions are created by closing and reopening the project.
  6. since it’s on the file system, anyone can diff between different versions of the files with their diff tool of choice (even word can diff between 2 word files). Personally I like a product called beyondcompare.
  7. since all the versions are under the versions folder, if you do use a third party version control system, you can tell it to ignore these folders.

regards
David

1 Like