Scrivener + Dropbox + git

So my cowriter and I are working on a story together; we have set up a workflow that currently looks like this:

  1. Open local Scrivener file, faff around, add research documents, write horrible exposition, make up plot, have attack of impostor syndrome. Save.
    2. git commit changes with brief message to cowriter of what we did (“added vocab references,” for example)
  2. git push to remote, which is a shared Dropbox folder
  3. other person does a git pull to their local Scrivener file
  4. profanity because there is a giant list of “_Recovered Files” in the Binder.

(Our local Scrivener files, obviously, are git repos.)

Can anyone help us troubleshoot why this last step is happening, and how to prevent it? I know I’ve been doin git commit -am "commit message" and git status gives me a list of modified files like Files/Docs/6.rtf (which is obviously the story itself) and reponame.scrivx, which I don’t know what it is, but I assume is metadata or something?

Recovered files will appear when the data folder with the RTF files does not match the meta-data for the project. That .scrivx file is the backbone of the project. It contains the Binder organisation, many settings and other assignments. If that is getting out of sync between machines, it could explain why material is coming up recovered. It’s a safety mechanism so that stuff doesn’t get lost. Another thing that could be happening is that files are not being correctly removed from the repository. Say you’ve deleted the research item that is associated with 6.rtf from the Binder. On the disk, 6.rtf will be removed and Binder ID 6 will be removed from the .scrivx file. But, if the repository commands you are running does not also remove 6.rtf, then the next time Scrivener runs it will see that file, note that there is nothing in the Binder .scrivx file for it, and load it as a recovered file back into the Binder.

Are you using Github or are you using your own repository server? If the former, you might give their free client a try. I played with a while back and it did a good job of keeping the project integrity intact.

Do you have “instructions” on how to set up this workflow for a similar situation - co authors in different locations sharing the .scriv file? Do we need to use the git commands or can we just open the same file independently but not simultaneously?

Unless by “Save,” you mean “close project”, that’s one thing you’re doing wrong. If the guy on the other end is updating his project while the same project is open on his machine, there’s another point of potential failure.

Even without updating while a project is open, your scrivx files are going to always be out of sync if you both make changes between pushes and pulls.

To illustrate the pitfalls of using git to share a project…

You each start with a blank project, pulled from your git repo.
Internally it just has a 1.rtf document that in the binder appears as “How to use this Template” or somesuch.
You both fire up Scrivener, and add 3 documents.
You name them a, b, and c in the binder and add some text to them.
He names his i, ii, and iii in the binder and adds text to each.
Internally, both of your projects create 2.rtf, 3.rtf, and 4.rtf files.
You commit and push.
He commits and pushes… what does git do with the identically named files that didn’t exist in the prior pull? What happens if he pulls while having local files that have identical names?
What about the scrivx file, which has different information, but with both reference 2.rtf?