I tried using it once, but I couldn't get it to work for me, so I gave up. I'm hoping that if I describe my desired workflow to people who know more about it I can get a better sense of whether it can help me.
Here's what I have:
- A server, with a directory I have read-only access to; this directory is the one I would like to keep in git-annex. Obviously, I have read-write access to other directories.
- A laptop, which is sometimes on the same LAN as the server and sometimes not; on this laptop, I would like to be able to easily maintain synced copies of certain subdirectories of the main directory (which is on the server). These copies should (ideally) not need to be in the same directory tree on the laptop.
I don't know if this description is clear enough (I'm doubtful), but I can answer questions.
The two problems are: Read-only directory, and wanting a clone that doesn't have the same directory structure.
For the read-only directory, you may be able to use a direct mode repository. You might need to set
GIT_DIR
in the environment to make the .git directory be placed somewhere outside the read-only directory.As to wanting different directory structure in your clone, it's an added complication I'd recommend avoiding. Not that it's impossible, you can move files around in the git repository and that could be automated via git-filter-branch or the like. But git-annex offers a simpler solution, which is to use the same directory structure and only get the contents of files in the subdirectories you want.
So I tried again (I got read-write access to the top level of the directory I want to share, so creating a .git was straightforward), and I had two things get in my way. I have a lot of relatively large files (~10,000), so I decided to use the WORM backend rather than waiting for the SHA to complete. Even so, adding everything was slow-going.
Since the most interesting feature of git-annex is queueing up downloads to sync on LAN, is there a way to add the files especially quickly by sacrificing some more safety? Essentially, I want to use git-annex as a glorified file server, letting my laptop do all the interesting work.
Second, when I Ctrl-C during
git annex add
, progress is not preserved in a direct-mode repository, so the add needs to start all over again.