1git-annex-sync(1)           General Commands Manual          git-annex-sync(1)
2
3
4

NAME

6       git-annex-sync - synchronize local repository with remotes
7

SYNOPSIS

9       git annex sync [remote ...]
10

DESCRIPTION

12       This command synchronizes the local repository with its remotes.
13
14       The  sync  process involves first committing any local changes to files
15       that have previously been added to the repository,  then  fetching  and
16       merging  the  synced/master  and  the  git-annex branch from the remote
17       repositories, and finally pushing the changes back to those branches on
18       the  remote  repositories. You can use standard git commands to do each
19       of those steps by hand, or  if  you  don't  want  to  worry  about  the
20       details, you can use sync.
21
22       The content of annexed objects is not synced by default, but the --con‐
23       tent option (see below) can make that also be synchronized.
24
25       Note that syncing with a remote will not normally update  the  remote's
26       working  tree  with  changes made to the local repository. (Unless it's
27       configured  with   receive.denyCurrentBranch=updateInstead.)   However,
28       those  changes are pushed to the remote, so they can be merged into its
29       working tree by running "git annex sync" on the remote.
30

OPTIONS

32       [remote]
33
34              By default, all remotes are synced, except for remotes that have
35              remote.<name>.annex-sync  set  to false. By specifying the names
36              of remotes (or remote groups), you can  control  which  ones  to
37              sync with.
38
39       --fast Only sync with the remotes with the lowest annex-cost value con‐
40              figured.
41
42       --commit, --no-commit
43              A commit is done by default (unless annex.autocommit is  set  to
44              false).
45
46              Use --no-commit to avoid committing local changes.
47
48       --message=msg
49              Use this option to specify a commit message.
50
51       --pull, --no-pull
52              By default, git pulls from remotes and imports from some special
53              remotes.  Use --no-pull to disable all pulling.
54
55              When remote.<name>.annex-pull  or  remote.<name>.annex-sync  are
56              set  to  false, pulling is disabled for those remotes, and using
57              --pull will not enable it.
58
59       --push, --no-push
60              By default, git pushes changes to remotes and  exports  to  some
61              special remotes. Use --no-push to disable all pushing.
62
63              When  remote.<name>.annex-push  or  remote.<name>.annex-sync are
64              set to false, or remote.<name>.annex-readonly is  set  to  true,
65              pushing is disabled for those remotes, and using --push will not
66              enable it.
67
68       --content, --no-content
69              Normally, syncing does not  transfer  the  contents  of  annexed
70              files.  The --content option causes the content of annexed files
71              to also be uploaded and downloaded as necessary.
72
73              The annex.synccontent configuration can be set to true  to  make
74              content be synced by default.
75
76              Normally  this  tries  to  get  each annexed file that the local
77              repository does not yet have, and then copies each file to every
78              remote that it is syncing with.  This behavior can be overridden
79              by configuring the preferred content of a repository.  See  git-
80              annex-preferred-content(1).
81
82              When  remote.<name>.annex-tracking-branch  is  configured  for a
83              special remote and that branch  is  checked  out,  syncing  will
84              import  changes from the remote, merge them into the branch, and
85              export any changes that have been committed to the  branch  back
86              to   the   remote.   See   See   git-annex-import(1)   and  git-
87              annex-export(1) for details about how  importing  and  exporting
88              work.
89
90       --content-of=path -C path
91              While  --content  operates  on  all  annexed files, --content-of
92              allows limiting the transferred files to ones in a  given  loca‐
93              tion.
94
95              This option can be repeated multiple times with different paths.
96
97       --all -A
98              This  option,  when combined with --content, makes all available
99              versions of all files be synced, when preferred content settings
100              allow.
101
102              Note  that  preferred  content  settings  that  use  include= or
103              exclude= will only match the version of files currently  in  the
104              work tree, but not past versions of files.
105
106       --jobs=N -JN
107              Enables parallel syncing with up to the specified number of jobs
108              running at once. For example: -J10
109
110              Setting this to "cpus" will run one job per CPU core.
111
112              When there are multiple git remotes, pushes will be made to them
113              in  parallel.  Pulls are not done in parallel because that tends
114              to be less efficient. When --content is synced,  the  files  are
115              processed in parallel as well.
116
117       --resolvemerge, --no-resolvemerge
118              By  default,  merge conflicts are automatically handled by sync.
119              When two conflicting versions of a  file  have  been  committed,
120              both  will  be added to the tree, under different filenames. For
121              example, file "foo" would be replaced with  "foo.variant-A"  and
122              "foo.variant-B". (See git-annex-resolvemerge(1) for details.)
123
124              Use  --no-resolvemerge  to disable this automatic merge conflict
125              resolution. It can also be disabled  by  setting  annex.resolve‐
126              merge to false.
127
128       --cleanup
129              Removes  the  local and remote synced/ branches, which were cre‐
130              ated and pushed by git-annex sync.
131
132              This can come in handy when you've synced a  change  to  remotes
133              and  now  want  to  reset  your  master  branch back before that
134              change. So you run git reset and force-push the master branch to
135              remotes, only to find that the next git annex merge or git annex
136              sync brings the changes back.  Why?  Because  the  synced/master
137              branch  is hanging around and still has the change in it. Clean‐
138              ing up the synced/ branches prevents that problem.
139

SEE ALSO

141       git-annex(1)
142
143       git-annex-preferred-content(1)
144

AUTHOR

146       Joey Hess <id@joeyh.name>
147
148                                                             git-annex-sync(1)
Impressum