git-annex/doc/git-annex-sync.mdwn
Joey Hess cee12f6a2f
multiple -m
sync, assist, import: Allow -m option to be specified multiple times, to
provide additional paragraphs for the commit message.

The option parser didn't allow multiple -m before, so there is no risk of
behavior change breaking something that was for some reason using multiple
-m already.

Pass through to git commands, so that the method used to assemble the
paragrahs is whatever git does. Which might conceivably change in the
future.

Note that git commit-tree has supported -m since git 1.7.7. commitTree
was probably not using it since it predates that version. Since the
configure script prevents building git-annex with git older than 2.1,
there is no risk that it's not supported now.

Sponsored-by: Nicholas Golder-Manning on Patreon
2024-03-27 15:58:27 -04:00

92 lines
2.3 KiB
Markdown

# NAME
git-annex sync - synchronize local repository with remotes
# SYNOPSIS
git annex sync `[remote ...]`
# DESCRIPTION
This command synchronizes the local repository with its remotes.
This command first commits any local changes to files that have
previously been added to the repository. Then it does the equivilant of
[[git-annex-pull]](1) followed by [[git-annex-push]](1).
However, unlike those commands, this command does not transfer annexed
content by default. That will change in a future version of git-annex,
when syncing with repositories that have preferred content configured.
# OPTIONS
* `--content`, `--no-content`, `-g`
The --content option causes the content of annexed files
to also be pulled and pushed.
The --no-content and -g options cause the content of annexed files to
not be pulled and pushed.
The `annex.synccontent` configuration can be set to true to make
`--content` be enabled by default.
* `--content-of=path` `-C path`
This option causes the content of annexed files in the given
path to also be pulled and pushed.
This option can be repeated multiple times with different paths.
Note that this option does not prevent exporting other files to an
"exporttree=yes" remote.
* `--commit`, `--no-commit`
A commit is done by default (unless `annex.autocommit` is set to false).
Use --no-commit to avoid committing local changes.
* `--message=msg` `-m msg`
Use this option to specify a commit message.
If multiple -m options are given, their values are concatenated
as separate paragraphs.
* `--pull`, `--no-pull`
Use this option to disable pulling.
When `remote.<name>.annex-sync` is set to false, pulling is disabled
for that remote, and using `--pull` will not enable it.
* `--push`, `--no-push`
Use this option to disable pushing.
When `remote.<name>.annex-sync` is set to false, pushing is disabled for
that remote, and using `--push` will not enable it.
* Also all options supported by [[git-annex-pull]](1) and
[[git-annex-push]](1) can be used.
* Also the [[git-annex-common-options]](1) can be used.
# SEE ALSO
[[git-annex]](1)
[[git-annex-pull]](1)
[[git-annex-push]](1)
[[git-annex-assist]](1)
[[git-annex-satisfy]](1)
# AUTHOR
Joey Hess <id@joeyh.name>
Warning: Automatically converted into a man page by mdwn2man. Edit with care.