---
name: "annex-to-annex"
section: "1p"
platform: "linux"
package: "libgit-annex-perl"
version: "0.008-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/annex-to-annex"
---

# annex-to-annex(1p)

use hardlinks to migrate files between git annex repos

## NAME

annex-to-annex - use hardlinks to migrate files between git annex repos

## VERSION

version 0.008

## SYNOPSIS

**annex-to-annex** \[**--commit**\] *source* ... *destination*

## DESCRIPTION

This script moves files and directories from one or more git annexes into a destination git annex, where possible using hardlinks instead of copying files.

It is useful for splitting and consolidating git annexes.  For example, at the end of the semester I use this script to move files from my work annex, which gets synced to a lot of places, into an archival annex, which doesn't.

Each *source* should be a file or directory in a git annex. *destination* should be a subdirectory of a git annex.

## OPTIONS

- **--commit**

  Commit changes in the source and destination annexes.  Otherwise changes are merely added to the index.

## SEE ALSO

[**git-annex**(1)](/git-annex/1.md), **annex-to-annex-dropunused**(1), **annex-to-annex-reinject**(1)

## AUTHOR

Sean Whitton \<spwhitton@spwhitton.name\>

## COPYRIGHT AND LICENSE

This software is Copyright (c) 2019-2021 by Sean Whitton \<spwhitton@spwhitton.name\>.

This is free software, licensed under:

```
  The GNU General Public License, Version 3, June 2007
```
