2013-09-07 23:18:16 +00:00
|
|
|
Notice that in the [[previous example|getting_file_content]], `git annex
|
|
|
|
sync` was used. This lets git-annex know what has changed in the other
|
|
|
|
repositories like the laptop, and so it knows about the files present there and can
|
2011-12-31 18:50:40 +00:00
|
|
|
get them.
|
|
|
|
|
2013-09-07 23:18:16 +00:00
|
|
|
Let's look at what the sync command does in more detail:
|
2011-12-31 18:50:40 +00:00
|
|
|
|
|
|
|
# cd /media/usb/annex
|
|
|
|
# git annex sync
|
|
|
|
commit
|
|
|
|
nothing to commit (working directory clean)
|
|
|
|
ok
|
|
|
|
pull laptop
|
|
|
|
ok
|
|
|
|
push laptop
|
|
|
|
ok
|
|
|
|
|
|
|
|
After you run sync, the repository will be updated with all changes made to
|
|
|
|
its remotes, and any changes in the repository will be pushed out to its
|
|
|
|
remotes, where a sync will get them. This is especially useful when using
|
|
|
|
git in a distributed fashion, without a
|
|
|
|
[[central bare repository|tips/centralized_git_repository_tutorial]]. See
|
|
|
|
[[sync]] for details.
|
2013-07-08 20:17:24 +00:00
|
|
|
|
|
|
|
Note that syncing only syncs the metadata about your files that is stored
|
|
|
|
in git. It does not sync the contents of files, that are managed by
|
|
|
|
git-annex.
|