Seeking some clarification:
I'm using direct mode. When I run
git annex sync --content
on repo A, all files get copied to repo B, but they remain hidden under.git/annex/objects
. Is there a way to automatically put them in repo B's working tree, without having to go to repo B and rungit annex sync
there as well? (I'm sure I saw that happen earlier, but not anymore?)I have two PCs and a portable HD. There are git-annex repos on PC_1 and USB_HD, with each other listed under
git remote
. Now I want to set up git-annex on PC_2. Is it okay to use the same repo path (~/Videos/) on both PCs? I'm concerned that it would confuse the USB_HD repo greatly, as it would end up having two "remotes" with identical paths.
You have to run something on the receiving remote to update its working tree. Running the assistant in that repository would be one easy option.
This is fine, git-annex will notice if a repository on a path changes and do the right thing.
Alright, thanks. For #1, it sounds like something like Git's hooks/post-receive would be very useful here – can they be used with direct mode, or might git-annex have its own mechanism?
Also question 3 – what's the proper way to remove files and have the deletion propagate to all repos? I couldn't find it under "Removing files"... Is it
git annex drop --force
? Or should I justrm
the files and hope thatgit annex sync
will pick it up?The latter seems to work, although the files remain in
git annex unused
, and when I rungit annex dropunused
I again get warnings about "0 out of 1 copies confirmed" (so I have to use--force
again), so it seems like a wrong way?(These are large read-only video files, I don't care about keeping revision history, only about syncing what I have. I haven't yet done any "preferred content" config either...)
You can use git's post-receive hook to run
git annex merge
to update a direct mode repository. See example in setup a public repository on a web site.It's fine to use --force with dropunused if you really want to force deleting the only copy of a file. git-annex will never delete the last copy of a file without being forced as a safety measure.