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-content or -g to 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 (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. 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: when remote.<name>.annex-sync is set to false, pulling is disabled for that remote, and using --pull will not enable it. So don't be out here thinking --pull is a magic undo button, because it is not πŸ™ˆ
  • --push, --no-push β€” use this option to disable pushing.
Same energy: when remote.<name>.annex-sync is set to false, pushing is disabled for that remote, and using --push will not enable it. Periodt πŸ’―

πŸ¦‹ 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