git-annex/doc/walkthrough/getting_file_content.mdwn
Joey Hess 90dd245522 get --from is the same as copy --from
get not honoring --from has surprised me a few times, so least surprise
suggests it should just behave like copy --from. This leaves the difference
between get and copy being that copy always requires the remote to copy
from, while get will decide whether to get a file from a key/value store or
a remote.
2011-06-09 18:54:49 -04:00

19 lines
773 B
Markdown

A repository does not always have all annexed file contents available.
When you need the content of a file, you can use "git annex get" to
make it available.
We can use this to copy everything in the laptop's annex to the
USB drive.
# cd /media/usb/annex
# git pull laptop master
# git annex get .
get my_cool_big_file (from laptop...) ok
get iso/debian.iso (from laptop...) ok
Notice that you had to git pull from laptop first, this lets git-annex know
what has changed in laptop, and so it knows about the files present there and
can get them. The alternate approach is to set up a central bare repository,
and always push changes to it after committing them, then in the above,
you can just pull from the central repository to get synced up to all
repositories.