I'm trying to figure out if git-annex can be used for the following use case:
- 2 repos in direct mode A and B
- A is on a local filesystem, B could be a NFS mountpoint or ssh
- B contains a number of toplevel directories, A contains a subset of those
- For the subset in A all changes in those directories that happen on A or B should be synced automatically between both repos, including file removals.
- A can decide to not carry a toplevel dir any more, but it must still exist in B.
- A can copy new toplevel dirs from B and those should be synced from then on.
I've been looking at the docs and played with two test repos, but I cannot seem to make the above work. To me it looks like I would need a possibility include/exclude paths from syncing via a regex.
Thanks, Felix
I guess you might be using the git-annex assistant. If you were just using git-annex at the command line, you could simply only run
git annex get
on the files or directories you wanted to get.You can control which directories the git-annex assistant downloads/uploads files for using preferred content expressions. Or the easy solution is to use the webapp to put the repository into "manual mode" and then manually run
git annex get
as described above to get just the files you want. (Andgit annex copy --to remote
to share new files you make.)