git-annex-sync(1)
π git-annex-sync β the group-chat rundown
okay so this is git-annex-sync(1) from the General Commands Manual β yes bestie, the same big git-annex manual family you already know and love π«Ά β and it's literally the page that teaches you how to make your local repo and its remotes, like, actually get on the same page. Let's go β¨
πΈ NAME πΈ
git-annex-sync β synchronize local repository with remotes π
π SYNOPSIS π
git annex sync [remote ...]
β¨ DESCRIPTION β¨
This command synchronizes the local repository with its remotes. That's it, that's the vibe check π¦
Here's the tea on the order of operations, because the order matters: it first commits any local changes to files that have previously been added to the repository. Then it does the equivalent of git-annex-pull(1) followed by git-annex-push(1). So: commit, pull, push. In that order, no skipping, no cap π₯
Now for the β¨special caseβ¨ that you need to know about. Unlike push and pull, this command defaults to avoiding transferring the content of annexed files to repositories that do not have preferred content configured. Yep β a whole special case, and the reason is to avoid a surprising behavior change. Using any option or configuration that enables content syncing β including --content, --content-of, and setting annex.synccontent β will avoid this special case. So the moment you opt into content, the special case dips and you get the normal content-tastic behavior π«
π OPTIONS π
--no-content,-g,--contentβ use--no-contentor-gto avoid transferring the content of annexed files.
If you often use --no-content, you can set the annex.synccontent configuration to false to prevent transferring content by default. The --content option overrides that configuration. So like, set it and forget it, but --content is the main character that can override it whenever it wants π
--content-of=path,-C pathβ only pull and push the content of annexed files in the given path.
This option can be repeated multiple times with different paths. Go off, list as many paths as your heart desires π
Heads up bestie: this option does not prevent exporting other files to an "exporttree=yes" remote. So don't come for it later, it warned you π
--commit,--no-commitβ a commit is done by default (unlessannex.autocommitis set tofalse).
Use --no-commit to avoid committing local changes.
--message=msg,-m msgβ use this option to specify a commit message. Very demure, very mindful of your git history π
If multiple -m options are given, their values are concatenated as separate paragraphs. Cute, right? Multiple -ms stack up like little paragraphs of lore π
--pull,--no-pullβ use this option to disable pulling.
Real talk: whenremote.<name>.annex-syncis set tofalse, pulling is disabled for that remote, and using--pullwill not enable it. So don't be out here thinking--pullis a magic undo button, because it is not π
--push,--no-pushβ use this option to disable pushing.
Same energy: whenremote.<name>.annex-syncis set tofalse, pushing is disabled for that remote, and using--pushwill not enable it. Periodt π―
- Also all options supported by
git-annex-pull(1)andgit-annex-push(1)can be used. Yeah, the whole menu β go wild π§ - Also the
git-annex-common-options(1)can be used. Iconic, as always β
π¦ SEE ALSO π¦
π AUTHOR π
Joey Hess <id@joeyh.name> β the legend himself, we stan π
okay that's the whole page, you're officially synced and slaying π this was git-annex-sync(1) from the General Commands Manual (the manual name is folded up there at the top like a little bow π) β mwah, go sync something, ily, bye ππΈ
π¦ where this page comes from
- alpine 3.24: git-annex-doc 10.20261026-r0 Β· AGPL-3.0-or-later
- arch rolling: git-annex 10.20261026-2 Β· AGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms