From 5c227b414eaee3c71d3caff6cfb69cd88f4edabd Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 1 Apr 2021 12:50:19 -0400 Subject: [PATCH] improve description of syncing with import/export remotes --- doc/git-annex-sync.mdwn | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/doc/git-annex-sync.mdwn b/doc/git-annex-sync.mdwn index 9ba72ba43d..08ed40a72f 100644 --- a/doc/git-annex-sync.mdwn +++ b/doc/git-annex-sync.mdwn @@ -34,6 +34,17 @@ similar with other branches). When `git-annex sync` is later run on the remote, it will merge the `synced/` branches that the repository has received. +Some special remotes contain a tree of files that can be imported +and/or exported, and syncing with these remotes behaves differently. +See [[git-annex-import]](1) and [[git-annex-export]](1) for details +about how importing and exporting work; syncing with such a remote +is essentially an import followed by an export. In many cases, +importing needs to download content from the remote, and so sync will +only import when the --content option is used. (And exporting only +ever happens when --content is used.) The remote's +`remote..annex-tracking-branch` also must be configured, and +have the same value as the currently checked out branch. + # OPTIONS * `[remote]` @@ -108,15 +119,6 @@ received. This behavior can be overridden by configuring the preferred content of a repository. See [[git-annex-preferred-content]](1). - When `remote..annex-tracking-branch` is configured for a special - remote and that branch is checked out, syncing with --content will - import changes from the remote, merge them into the branch, and export - any changes that have been committed to the branch back to the remote. - With --no-content, imports will only be made from special remotes that - support importing without transferring files, and no exports will be done. - See [[git-annex-import]](1) and [[git-annex-export]](1) for details - about how importing and exporting work. - * `--content-of=path` `-C path` While --content operates on all annexed files,