How well do darktable and git-annex integrate?

I use git-annex with darktable and it generally works well. One gotcha is that if you git annex add the sidecar files (.xmp) you will have trouble if you reimport images. The problem, if I understand things correctly, is that Darktable normally writes its information to the XMP files, but if it can’t write it doesn’t warn you and then when it reloads the file, that will overwrite the database settings. I added this configuration to the .gitattributes file, to make sure this problem doesn’t occur:

*.xmp annex.largefiles=nothing

I add files into git-annex before I start working on them in Darktable. That way I feel safer deleting and processing images in DT: I know that I can always rollback in git-annex. Even if a file is deleted, it’s actually still present in git-annex. Every once in a while, I run git annex unused to look at how much crap I have removed and clean it up with git annex dropunused.

I generally sync the entire collection to all my devices. Failure to do so will mean thumbnails will fail to load in Darktable, for example. I would love it if Darktable could dynamically load/drop files from the collection. There’s a plugin that helps with that, but I haven’t tried it out.

Finally, the biggest problem I have syncing Darktable data around is the database itself is outside of the photo directory: that doesn’t get sync’d, naturally. Since most data can be copied in the XMP files, so far it would generally work anyways, but I would have to copy settings between my different Darktable instances, for example. Of course, the same version of DT needs to be running everywhere otherwise new plugins from one instance will not load if missing from the other.

Overall, I’d say it works fairly well, but integration could be improved, especially with “local file copies” which could use git-annex to sync files around.