As I am beginning to experiment with git-annex, I am trying to imagine a system as hand-free as possible, that could be usable even for non-git users once everything is setup. Knowing the safety limitations of using files directly, I tend towards using either an unlocked adjusted branch with annex.thin, or a directory special remote (exporttree=yes, importtree=yes), as git-annex will operate further away from the tracked data.
The setup will include multiple computers sharing the same tree, which will have multiple copies across other servers. As each computer will have a different set of prefered content rules, it is important to see missing files.
I feel that the unlocked mode is the safer option, but there is the appeal in having files mostly untouched as in the directory special remote.
How do both methods compare from a user perspective? What are their limitations? Is there a way to show hidden files on a directory special remote (as drafted)?
I'd just go with
git annex config --set annex.addunlocked true
and have the assistant run on all machines. I wouldn't useannex.thin
, though it's appealing to not have files use twice their size, but it is insecure and can easily cause data loss. If possible, I'd also not use an adjusted unlocked branch, because that's yet another layer of complexity where things could go wrong. It usually works, but can also produce weirdness (e.g. there was a bug fixed lately where rexent changes were deleted when syncing an unlocked branch).Plain git remotes on all sides work most reliably, safely and efficiently with git annex in my experience.
The directory special remote with
importtree=yes exporttree=yes
is indeed getting fairly close to feature parity with using all unlocked files withannex.thin
set.One big difference is that such a special remote will always be untrusted. Which might prevent dropping files from elsewhere.
Importing from the directory special remote is slower than just running
git commit
. And it probably always will be; git is just fast. Although importing was sped up significantly a few months ago.Using annex.thin needs the filesystem to support hard links, or git-annex stores 2 copies of every file. This is the main reason I'd use a directory special remote instead sometimes, when using a filesystem like FAT.
Another reason is if there's some requirement that the directory not be a git repository. Eg, if it's published by a web server, but you don't want to publish all the git history.
Otherwise, I'd always prefer the git repository.