2011-02-27 16:45:48 +00:00
|
|
|
Like any other git repository, git-annex repositories have remotes.
|
|
|
|
Let's start by adding a USB drive as a remote.
|
|
|
|
|
2019-03-27 15:15:03 +00:00
|
|
|
$ sudo mount /media/usb
|
|
|
|
$ cd /media/usb
|
|
|
|
$ git clone ~/annex
|
|
|
|
$ cd annex
|
|
|
|
$ git annex init "portable USB drive"
|
|
|
|
$ git remote add laptop ~/annex
|
|
|
|
$ cd ~/annex
|
|
|
|
$ git remote add usbdrive /media/usb/annex
|
2011-02-27 16:45:48 +00:00
|
|
|
|
|
|
|
This is all standard ad-hoc distributed git repository setup.
|
2015-10-06 19:59:43 +00:00
|
|
|
|
|
|
|
The only git-annex specific part is telling it a description
|
|
|
|
of the new repository created on the USB drive. This is optional, but
|
|
|
|
giving the repository a description helps when git-annex talks about it
|
|
|
|
later.
|
2011-02-27 16:45:48 +00:00
|
|
|
|
|
|
|
Notice that both repos are set up as remotes of one another. This lets
|
2021-09-21 17:23:57 +00:00
|
|
|
either get annexed files from the other. You'll often want to do that
|
|
|
|
even when you are using git in a more centralized fashion.
|