efd555848d
You do not need to pull from a remote to make git-annex aware of it. Pulling only makes git know about remote/master branches, but git-annex does not care about that. When git-annex encounters a remote in .git/config that has no recorded annex.uuid, it connects to it to get the uuid automatically, and will immediately start using it. A later part of this walkthrough shows how to pull from a remote in order to get its location tracking info, so that git-annex can retrieve files from it. That's the right place to document the need to pull from a remote periodically.
19 lines
675 B
Markdown
19 lines
675 B
Markdown
Like any other git repository, git-annex repositories have remotes.
|
|
Let's start by adding a USB drive as a remote.
|
|
|
|
# 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
|
|
|
|
This is all standard ad-hoc distributed git repository setup.
|
|
The only git-annex specific part is telling it the name
|
|
of the new repository created on the USB drive.
|
|
|
|
Notice that both repos are set up as remotes of one another. This lets
|
|
either get annexed files from the other. You'll want to do that even
|
|
if you are using git in a more centralized fashion.
|