aboutsummaryrefslogtreecommitdiff
path: root/doc/walkthrough/adding_a_remote.mdwn
blob: c02852544d2d2a1be8c3936c54b58ef907574df9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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/annex

This is all standard ad-hoc distributed git repository setup.

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.

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.