Hi,
I have set up git-annex to sync a folder located on laptop A, USB Key, and laptop B. After reading the walkthrough, I don't quite understand the proper procedure to keep in sync. Should I run git-annex sync from within the sync directory on the USB Key on laptop A and then from within the sync folder on the USB Key when plugged into laptop B? Or do I have to run git-annex sync from within the sync directory on the laptops, then the USB Key? And/or do I have to run git-annex get on the sync directory on the USB key before syncing to the second laptop?
Also I should not normally be making changes on laptops A and B at the same time, but if that were the case, is there any difference in what I would run to sync the changes?
Thanks!
Well, working with git annex, you should think of two things:
So, for your sneekernet scenario these general steps are required:
Let's describe your options on every step:
git annex sync
on Laptop A. Either from within USB or Laptop repo, I prefer Laptop because of automatic commit.git annex copy <files> --to=<usb-remote-name>
from within Laptop A repogit annex get <files>
from within USB repo. This is not possible if you have bare repo on USB.git annex sync
on Laptop BAlso, using
git annex sync --content
, you don't need to manually transfer CONTENT, see --content. But in this case you somewhat loose control of what is transferred.If you make changes on both laptops at the same time no extra steps required. In case of conflict both versions saved in working directory, see automatic conflict resolution.