git-annex-mirror(1)
β¨ git-annex-mirror β¨
okay bestie, welcome to git-annex-mirror π this is the mirror girlie from the General Commands Manual, and she is so underrated. sit down, hydrate, let's get into it π«Ά
πΈ NAME πΈ
git-annex-mirror β mirror content of files to/from another repository
π¦ SYNOPSIS π¦
---
# π DESCRIPTION π
so like. the whole vibe here is that this command makes a <mint>destination repository</mint> mirror a <mint>source repository</mint>. copy my fit exactly, no notes π
Every single file you specify in the source repository gets mirrored over to the destination repository. If a file's content is <green>present</green> in the source repo, it gets copied to the destination. If a file's content is <red>not</red> present in the source repo? Then it will be <hotpink>dropped</hotpink> from the destination repository β but only when the `numcopies` setting allows it. like, she's not reckless, she checks first π
> β οΈ lowkey important: `mirror` does **not** sync the git repository, bestie. it only does the **file contents**. that's it. if you wanted the git side too, use `git-annex-sync(1)` for that. different girl, different job π₯
---
# π
OPTIONS π
- **`--to=remote`** β treats your local repository as the *source* repo and mirrors its contents out to the remote. you're the giver in this scenario π
- **`--from=remote`** β flips it! the remote becomes the *source* repo and its contents get mirrored into your local repository. receiving era π«Ά
- **`--jobs=N`, `-JN`** β turns on parallel transfers, with up to the number of jobs you specify running at the same time. for example: `-J10` β¨
Setting this to `"cpus"` will run one job per CPU core. it's giving "let the machine cook" π₯
- **`--all`, `-A`** β mirrors *all* objects stored in the git annex, not just the objects that currently existing files use. full sweep, main character energy π
> π¨ however!! this <red>bypasses</red> checking the `.gitattributes` `annex.numcopies` setting when dropping files. so like, be aware, no cap.
This is the default behavior when running git-annex in a <purple>bare repository</purple>.
- **`--branch=ref`** β operate on files in the specified branch or treeish πΏ
> π¨ same warning as `--all`: this <red>bypasses</red> checking the `.gitattributes` `annex.numcopies` setting when dropping files.
- **`--unused`** β operates on the files that were found by the last run of `git-annex unused`. it remembers the leftovers for you π
- **`--failed`** β operates on files that have recently failed to be transferred. retry era, we don't leave them behind π
- **matching options** β the `git-annex-matching-options(1)` can be used to control what exactly gets mirrored. very "choose your own adventure" of her π§
- **`--json`** β enables JSON output! this is intended to be parsed by programs that use git-annex. each line of output is a JSON object π»
> π note that unlike all other commands that support `--json`, this command outputs <hotpink>different types of json objects</hotpink> in different circumstances. she contains multitudes, fr fr.
- **`--json-progress`** β includes progress objects in the JSON output. so you can watch the little bar go π
- **`--json-error-messages`** β messages that would normally be output to standard error get included in the JSON instead. no lost error girlies π
- Also the `git-annex-common-options(1)` can be used. go wild, bestie π
---
# π SEE ALSO π
- `git-annex(1)`
- `git-annex-sync(1)`
---
# π AUTHOR π
Joey Hess `<id@joeyh.name>` β icon, legend, the moment π
---
and that's the whole page, bestie!! this was `git-annex-mirror(1)` from the <purple>General Commands Manual</purple>, straight from the source. go mirror something slayfully πβ¨π¦
π¦ 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
- debian trixie: git-annex 10.20250416-2 Β· AGPL-3.0-or-later
- debian trixie: git-annex 10.20250416-2+deb13u1 Β· AGPL-3.0-or-later
- epel 10: git-annex 10.20250320-1.el10_0 Β· AGPL-3.0-or-later
- fedora 43: git-annex 10.20250630-4.fc43 Β· AGPL-3.0-or-later
- fedora 43: git-annex 10.20250929-5.fc43 Β· AGPL-3.0-or-later
- fedora 44: git-annex 10.20260115-1.fc44 Β· AGPL-3.0-or-later
- nixos 26.05: git-annex 10.20260421
- nixpkgs unstable: git-annex 10.20260421
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- ubuntu noble: git-annex 10.20240129-1build1 Β· AGPL-3.0-or-later
- ubuntu questing: git-annex 10.20250721-1
- ubuntu resolute: git-annex 10.20251029-1ubuntu1 Β· AGPL-3.0-or-later
- ubuntu stonking: git-annex 10.20251029-1ubuntu1 Β· AGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms