2010-10-19 19:59:40 +00:00
|
|
|
# NAME
|
|
|
|
|
|
|
|
git-annex - manage files with git, without checking their contents in
|
|
|
|
|
|
|
|
# SYNOPSIS
|
|
|
|
|
2010-12-30 20:52:24 +00:00
|
|
|
git annex command [params ...]
|
2010-10-19 19:59:40 +00:00
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
|
2010-10-09 18:06:25 +00:00
|
|
|
git-annex allows managing files with git, without checking the file
|
2010-10-15 23:32:33 +00:00
|
|
|
contents into git. While that may seem paradoxical, it is useful when
|
|
|
|
dealing with files larger than git can currently easily handle, whether due
|
|
|
|
to limitations in memory, checksumming time, or disk space.
|
|
|
|
|
|
|
|
Even without file content tracking, being able to manage files with git,
|
|
|
|
move files around and delete files with versioned directory trees, and use
|
|
|
|
branches and distributed clones, are all very handy reasons to use git. And
|
|
|
|
annexed files can co-exist in the same git repository with regularly
|
|
|
|
versioned files, which is convenient for maintaining documents, Makefiles,
|
|
|
|
etc that are associated with annexed files but that benefit from full
|
|
|
|
revision control.
|
2010-10-09 18:06:25 +00:00
|
|
|
|
2010-10-19 19:59:40 +00:00
|
|
|
When a file is annexed, its content is moved into a key-value store, and
|
|
|
|
a symlink is made that points to the content. These symlinks are checked into
|
2014-01-18 06:30:01 +00:00
|
|
|
git and versioned like regular files. You can move them around, delete
|
2010-10-19 19:59:40 +00:00
|
|
|
them, and so on. Pushing to another git repository will make git-annex
|
|
|
|
there aware of the annexed file, and it can be used to retrieve its
|
|
|
|
content from the key-value store.
|
|
|
|
|
|
|
|
# EXAMPLES
|
|
|
|
|
|
|
|
# git annex get video/hackity_hack_and_kaxxt.mov
|
|
|
|
get video/_why_hackity_hack_and_kaxxt.mov (not available)
|
|
|
|
I was unable to access these remotes: server
|
|
|
|
Try making some of these repositories available:
|
|
|
|
5863d8c0-d9a9-11df-adb2-af51e6559a49 -- my home file server
|
|
|
|
58d84e8a-d9ae-11df-a1aa-ab9aa8c00826 -- portable USB drive
|
|
|
|
ca20064c-dbb5-11df-b2fe-002170d25c55 -- backup SATA drive
|
|
|
|
failed
|
|
|
|
# sudo mount /media/usb
|
|
|
|
# git remote add usbdrive /media/usb
|
|
|
|
# git annex get video/hackity_hack_and_kaxxt.mov
|
2011-06-09 22:54:49 +00:00
|
|
|
get video/hackity_hack_and_kaxxt.mov (from usbdrive...) ok
|
2010-10-19 19:59:40 +00:00
|
|
|
|
|
|
|
# git annex add iso
|
|
|
|
add iso/Debian_5.0.iso ok
|
|
|
|
|
2010-10-23 16:41:13 +00:00
|
|
|
# git annex drop iso/Debian_4.0.iso
|
|
|
|
drop iso/Debian_4.0.iso ok
|
2010-10-21 21:59:32 +00:00
|
|
|
|
2010-10-23 16:41:13 +00:00
|
|
|
# git annex move iso --to=usbdrive
|
2010-10-26 00:48:32 +00:00
|
|
|
move iso/Debian_5.0.iso (moving to usbdrive...) ok
|
2010-10-19 19:59:40 +00:00
|
|
|
|
2011-09-16 02:22:43 +00:00
|
|
|
# COMMONLY USED COMMANDS
|
2010-10-19 19:59:40 +00:00
|
|
|
|
2014-01-18 06:30:01 +00:00
|
|
|
Like many git commands, git-annex can be passed a path that
|
2010-10-19 19:59:40 +00:00
|
|
|
is either a file or a directory. In the latter case it acts on all relevant
|
2011-09-16 02:22:43 +00:00
|
|
|
files in the directory. When no path is specified, most git-annex commands
|
2011-01-14 03:36:58 +00:00
|
|
|
default to acting on all relevant files in the current directory (and
|
|
|
|
subdirectories).
|
2010-10-19 19:59:40 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `add [path ...]`
|
2010-10-19 19:59:40 +00:00
|
|
|
|
|
|
|
Adds files in the path to the annex. Files that are already checked into
|
|
|
|
git, or that git has been configured to ignore will be silently skipped.
|
2013-09-11 00:47:13 +00:00
|
|
|
(Use `--force` to add ignored files.) Dotfiles are skipped unless explicitly
|
2012-01-03 04:09:09 +00:00
|
|
|
listed.
|
2010-10-19 19:59:40 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `get [path ...]`
|
2010-10-19 19:59:40 +00:00
|
|
|
|
2011-08-28 20:28:38 +00:00
|
|
|
Makes the content of annexed files available in this repository. This
|
|
|
|
will involve copying them from another repository, or downloading them,
|
|
|
|
or transferring them from some kind of key-value store.
|
2010-10-19 19:59:40 +00:00
|
|
|
|
2011-10-27 23:04:12 +00:00
|
|
|
Normally git-annex will choose which repository to copy the content from,
|
2013-09-11 00:47:13 +00:00
|
|
|
but you can override this using the `--from` option.
|
2011-10-27 23:04:12 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `drop [path ...]`
|
2010-10-19 19:59:40 +00:00
|
|
|
|
2014-01-18 06:30:01 +00:00
|
|
|
Drops the content of annexed files from this repository.
|
2010-10-19 19:59:40 +00:00
|
|
|
|
2011-09-15 17:30:04 +00:00
|
|
|
git-annex will refuse to drop content if it cannot verify it is
|
2013-09-11 00:47:13 +00:00
|
|
|
safe to do so. This can be overridden with the `--force` switch.
|
2011-10-28 21:26:38 +00:00
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
To drop content from a remote, specify `--from`.
|
2011-09-15 17:30:04 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `move [path ...]`
|
2014-01-18 06:30:01 +00:00
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
When used with the `--from` option, moves the content of annexed files
|
2011-03-27 22:34:30 +00:00
|
|
|
from the specified repository to the current one.
|
2010-10-19 19:59:40 +00:00
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
When used with the `--to` option, moves the content of annexed files from
|
2010-10-23 16:41:13 +00:00
|
|
|
the current repository to the specified one.
|
2010-10-21 21:59:32 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `copy [path ...]`
|
2010-11-27 21:02:53 +00:00
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
When used with the `--from` option, copies the content of annexed files
|
2011-03-27 22:34:30 +00:00
|
|
|
from the specified repository to the current one.
|
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
When used with the `--to` option, copies the content of annexed files from
|
2010-11-27 21:02:53 +00:00
|
|
|
the current repository to the specified one.
|
|
|
|
|
2013-12-02 19:41:20 +00:00
|
|
|
To avoid contacting the remote to check if it has every file
|
|
|
|
when copying --to the repository, specify `--fast`
|
|
|
|
|
|
|
|
To force checking the remote for every file when copying --from the
|
|
|
|
repository, specify `--force`.
|
2010-11-27 21:02:53 +00:00
|
|
|
|
2013-12-26 21:08:43 +00:00
|
|
|
* `status [path ...]`
|
2013-11-07 17:55:36 +00:00
|
|
|
|
|
|
|
Similar to `git status --short`, displays the status of the files in the
|
|
|
|
working tree. Shows files that are not checked into git, files that
|
2014-01-18 06:30:01 +00:00
|
|
|
have been deleted, and files that have been modified.
|
|
|
|
Particularly useful in direct mode.
|
2013-11-07 17:55:36 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `unlock [path ...]`
|
2010-10-19 19:59:40 +00:00
|
|
|
|
2011-03-03 20:58:52 +00:00
|
|
|
Normally, the content of annexed files is protected from being changed.
|
2014-01-18 06:30:01 +00:00
|
|
|
Unlocking an annexed file allows it to be modified. This replaces the
|
2011-03-03 20:58:52 +00:00
|
|
|
symlink for each specified file with a copy of the file's content.
|
|
|
|
You can then modify it and `git annex add` (or `git commit`) to inject
|
|
|
|
it back into the annex.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `edit [path ...]`
|
2011-03-03 20:58:52 +00:00
|
|
|
|
|
|
|
This is an alias for the unlock command. May be easier to remember,
|
|
|
|
if you think of this as allowing you to edit an annexed file.
|
2010-10-19 19:59:40 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `lock [path ...]`
|
2010-11-08 01:02:25 +00:00
|
|
|
|
2010-11-09 19:11:45 +00:00
|
|
|
Use this to undo an unlock command if you don't want to modify
|
|
|
|
the files, or have made modifications you want to discard.
|
2010-11-08 01:02:25 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `sync [remote ...]`
|
2011-12-10 00:27:22 +00:00
|
|
|
|
2011-12-27 18:23:41 +00:00
|
|
|
Use this command when you want to synchronize the local repository with
|
2013-12-04 06:10:18 +00:00
|
|
|
one or more of its remotes. You can specify the remotes to sync with;
|
2013-09-11 00:47:13 +00:00
|
|
|
the default is to sync with all remotes. Or specify `--fast` to sync with
|
2011-12-31 01:17:36 +00:00
|
|
|
the remotes with the lowest annex-cost value.
|
2011-12-30 23:45:23 +00:00
|
|
|
|
2014-01-18 06:30:01 +00:00
|
|
|
The sync process involves first committing all local changes,
|
2012-01-02 18:20:51 +00:00
|
|
|
then fetching and merging the `synced/master` and the `git-annex` branch
|
2014-01-18 06:30:01 +00:00
|
|
|
from the remote repositories, and finally pushing the changes back to
|
2011-12-30 23:45:23 +00:00
|
|
|
those branches on the remote repositories. You can use standard git
|
|
|
|
commands to do each of those steps by hand, or if you don't want to
|
|
|
|
worry about the details, you can use sync.
|
|
|
|
|
2014-01-18 06:30:01 +00:00
|
|
|
Merge conflicts are automatically handled by sync. When two conflicting
|
2012-06-27 17:08:32 +00:00
|
|
|
versions of a file have been committed, both will be added to the tree,
|
|
|
|
under different filenames. For example, file "foo" would be replaced
|
|
|
|
with "foo.somekey" and "foo.otherkey".
|
|
|
|
|
2011-12-30 23:45:23 +00:00
|
|
|
Note that syncing with a remote will not update the remote's working
|
|
|
|
tree with changes made to the local repository. However, those changes
|
2014-01-18 06:30:01 +00:00
|
|
|
are pushed to the remote, so they can be merged into its working tree
|
2011-12-30 23:45:23 +00:00
|
|
|
by running "git annex sync" on the remote.
|
2011-12-27 18:23:41 +00:00
|
|
|
|
2014-01-19 21:35:36 +00:00
|
|
|
With the `--content` option, the contents of annexed files in the work
|
|
|
|
tree will also be uploaded and downloaded from remotes. By default,
|
|
|
|
this tries to get each annexed file that the local repository does not
|
|
|
|
yet have, and then copies each file to every remote that it is syncing with.
|
|
|
|
This behavior can be overridden by configuring the preferred content of
|
|
|
|
a repository. See see PREFERRED CONTENT below.
|
2011-12-10 00:27:22 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `merge`
|
2013-07-03 19:42:56 +00:00
|
|
|
|
|
|
|
This performs the same merging that is done by the sync command, but
|
|
|
|
without pushing or pulling any data.
|
|
|
|
|
|
|
|
One way to use this is to put `git annex merge` into a repository's
|
|
|
|
post-receive hook. Then any syncs to the repository will update its working
|
|
|
|
copy automatically.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `mirror [path ...]`
|
2013-12-04 06:10:18 +00:00
|
|
|
|
2013-08-20 19:46:35 +00:00
|
|
|
This causes a destination repository to mirror a source repository.
|
|
|
|
|
|
|
|
To use the local repository as the source repository,
|
2013-09-11 00:47:13 +00:00
|
|
|
specify mirror `--to` remote.
|
2013-08-20 19:46:35 +00:00
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
To use a remote as the source repository, specify mirror `--from` remote.
|
2013-08-20 19:46:35 +00:00
|
|
|
|
|
|
|
Each specified file in the source repository is mirrored to the destination
|
|
|
|
repository. If a file's content is present in the source repository, it is
|
|
|
|
copied to the destination repository. If a file's content is not present in
|
|
|
|
the source repository, it will be dropped from the destination repository
|
2014-01-01 21:39:33 +00:00
|
|
|
when the numcopies setting allows.
|
2013-08-20 19:46:35 +00:00
|
|
|
|
|
|
|
Note that mirror does not sync the git repository, but only the file
|
|
|
|
contents.
|
|
|
|
|
2014-01-01 21:39:33 +00:00
|
|
|
Also, --all may be specified to mirror all objects stored in the git
|
|
|
|
annex, not only objects used by currently existing files. However, this
|
|
|
|
bypasses checking the .gitattributes annex.numcopies setting when
|
|
|
|
dropping files.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `addurl [url ...]`
|
2011-09-16 02:22:43 +00:00
|
|
|
|
2012-02-08 19:35:18 +00:00
|
|
|
Downloads each url to its own file, which is added to the annex.
|
2011-09-16 02:22:43 +00:00
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
To avoid immediately downloading the url, specify `--fast`.
|
2012-02-08 19:35:18 +00:00
|
|
|
|
2013-03-11 23:55:01 +00:00
|
|
|
To avoid storing the size of the url's content, and accept whatever
|
2013-09-11 00:47:13 +00:00
|
|
|
is there at a future point, specify `--relaxed`. (Implies `--fast`.)
|
2013-03-11 23:55:01 +00:00
|
|
|
|
2012-02-16 16:25:19 +00:00
|
|
|
Normally the filename is based on the full url, so will look like
|
2012-02-16 18:26:53 +00:00
|
|
|
"www.example.com_dir_subdir_bigfile". For a shorter filename, specify
|
2013-09-11 01:00:59 +00:00
|
|
|
`--pathdepth=N`. For example, `--pathdepth=1` will use "dir/subdir/bigfile",
|
2013-09-11 00:47:13 +00:00
|
|
|
while `--pathdepth=3` will use "bigfile". It can also be negative;
|
|
|
|
`--pathdepth=-2` will use the last two parts of the url.
|
2012-02-16 16:25:19 +00:00
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
Or, to directly specify what file the url is added to, specify `--file`.
|
2012-02-16 16:25:19 +00:00
|
|
|
This changes the behavior; now all the specified urls are recorded as
|
|
|
|
alternate locations from which the file can be downloaded. In this mode,
|
|
|
|
addurl can be used both to add new files, or to add urls to existing files.
|
2011-09-16 02:22:43 +00:00
|
|
|
|
2013-08-22 22:25:21 +00:00
|
|
|
When quvi is installed, urls are automatically tested to see if they
|
2014-01-18 06:30:01 +00:00
|
|
|
point to a video hosting site, and the video is downloaded instead.
|
2013-08-22 22:25:21 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `rmurl file url`
|
2013-04-22 21:18:53 +00:00
|
|
|
|
|
|
|
Record that the file is no longer available at the url.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `import [path ...]`
|
2012-05-31 23:47:18 +00:00
|
|
|
|
|
|
|
Moves files from somewhere outside the git working copy, and adds them to
|
2014-01-18 06:30:01 +00:00
|
|
|
the annex. Individual files to import can be specified.
|
2013-09-25 17:16:55 +00:00
|
|
|
If a directory is specified, the entire directory is imported.
|
2012-05-31 23:47:18 +00:00
|
|
|
|
2013-09-25 17:16:55 +00:00
|
|
|
git annex import /media/camera/DCIM/*
|
2012-05-31 23:47:18 +00:00
|
|
|
|
2013-08-11 16:56:26 +00:00
|
|
|
By default, importing two files with the same contents from two different
|
|
|
|
locations will result in both files being added to the repository.
|
2013-08-14 23:29:50 +00:00
|
|
|
(With all checksumming backends, including the default SHA256E,
|
|
|
|
only one copy of the data will be stored.)
|
2013-08-11 16:56:26 +00:00
|
|
|
|
|
|
|
To not delete files from the import location, use the
|
2013-09-11 00:47:13 +00:00
|
|
|
`--duplicate` option. This could allow importing the same files repeatedly
|
2013-08-11 16:56:26 +00:00
|
|
|
to different locations in a repository. More likely, it could be used to
|
|
|
|
import the same files to a number of different branches or separate git
|
|
|
|
repositories.
|
|
|
|
|
2013-08-20 14:27:24 +00:00
|
|
|
To only import files whose content has not been seen before by git-annex,
|
2013-09-11 01:00:59 +00:00
|
|
|
use the `--deduplicate` option. Duplicate files will be deleted from the
|
2013-08-20 14:27:24 +00:00
|
|
|
import location.
|
2013-12-04 06:10:18 +00:00
|
|
|
|
2013-12-04 17:13:30 +00:00
|
|
|
To only import files whose content has not been seen before by git-annex,
|
|
|
|
but avoid deleting duplicate files, use the `--skip-duplicates` option.
|
|
|
|
|
2013-09-11 01:00:59 +00:00
|
|
|
The `--clean-duplicates` option does not import any new files, but any files
|
2013-08-11 16:56:26 +00:00
|
|
|
found in the import location that are duplicates of content in the annex
|
|
|
|
are deleted.
|
2013-12-04 06:10:18 +00:00
|
|
|
|
2013-09-11 01:00:59 +00:00
|
|
|
(Note that using `--deduplicate` or `--clean-duplicates` with the WORM
|
2013-08-11 16:56:26 +00:00
|
|
|
backend does not look at file content, but filename and mtime.)
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `importfeed [url ...]`
|
2013-07-28 19:27:36 +00:00
|
|
|
|
|
|
|
Imports the contents of podcast feeds. Only downloads files whose
|
|
|
|
urls have not already been added to the repository before, so you can
|
|
|
|
delete, rename, etc the resulting files and repeated runs won't duplicate
|
2013-09-11 01:00:59 +00:00
|
|
|
them. (Use `--force` to force downloading urls it's seen before.)
|
2013-07-28 19:27:36 +00:00
|
|
|
|
2013-09-11 01:00:59 +00:00
|
|
|
Use `--template` to control where the files are stored.
|
2013-07-28 19:27:36 +00:00
|
|
|
The default template is '${feedtitle}/${itemtitle}${extension}'
|
|
|
|
(Other available variables: feedauthor, itemauthor, itemsummary, itemdescription, itemrights, itemid)
|
|
|
|
|
2013-09-11 01:00:59 +00:00
|
|
|
The `--relaxed` and `--fast` options behave the same as they do in addurl.
|
2013-12-29 19:52:20 +00:00
|
|
|
|
|
|
|
When quvi is installed, links in the feed are tested to see if they
|
|
|
|
are on a video hosting site, and the video is downloaded. This allows
|
|
|
|
importing eg, youtube playlists.
|
2013-07-28 19:27:36 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `watch`
|
2012-06-07 03:27:20 +00:00
|
|
|
|
|
|
|
Watches for changes to files in the current directory and its subdirectories,
|
|
|
|
and takes care of automatically adding new files, as well as dealing with
|
2012-06-11 04:39:09 +00:00
|
|
|
deleted, copied, and moved files. With this running as a daemon in the
|
|
|
|
background, you no longer need to manually run git commands when
|
|
|
|
manipulating your files.
|
|
|
|
|
2013-11-07 19:22:45 +00:00
|
|
|
By default, all files in the directory will be added to the repository.
|
|
|
|
(Including dotfiles.) To block some files from being added, use
|
|
|
|
`.gitignore` files.
|
2013-12-04 06:10:18 +00:00
|
|
|
|
2013-11-07 19:22:45 +00:00
|
|
|
By default, all files that are added are added to the annex, the same
|
|
|
|
as when you run `git annex add`. If you configure annex.largefiles,
|
|
|
|
files that it does not match will instead be added with `git add`.
|
|
|
|
|
2013-09-11 01:00:59 +00:00
|
|
|
To not daemonize, run with `--foreground` ; to stop a running daemon,
|
2014-01-18 06:30:01 +00:00
|
|
|
run with `--stop`.
|
2012-06-07 03:27:20 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `assistant`
|
2012-06-22 17:04:03 +00:00
|
|
|
|
|
|
|
Like watch, but also automatically syncs changes to other remotes.
|
2012-07-26 01:26:13 +00:00
|
|
|
Typically started at boot, or when you log in.
|
|
|
|
|
2013-09-11 01:00:59 +00:00
|
|
|
With the `--autostart` option, the assistant is started in any repositories
|
2014-01-18 06:30:01 +00:00
|
|
|
it has created. These are listed in `~/.config/git-annex/autostart`.
|
2012-12-29 18:43:53 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `webapp`
|
2012-07-26 01:26:13 +00:00
|
|
|
|
2013-04-08 19:04:35 +00:00
|
|
|
Opens a web app, that allows easy setup of a git-annex repository,
|
2012-08-01 20:40:38 +00:00
|
|
|
and control of the git-annex assistant.
|
2012-06-22 17:04:03 +00:00
|
|
|
|
2013-04-08 19:04:35 +00:00
|
|
|
By default, the webapp can only be accessed from localhost, and running
|
|
|
|
it opens a browser window.
|
|
|
|
|
2013-09-11 01:00:59 +00:00
|
|
|
With the `--listen=address[:port]` option, the webapp can be made to listen
|
2013-04-09 19:18:05 +00:00
|
|
|
for connections on the specified address. This disables running a
|
2013-04-08 19:04:35 +00:00
|
|
|
local web browser, and outputs the url you can use to open the webapp
|
|
|
|
from a remote computer.
|
|
|
|
Note that this does not yet use HTTPS for security, so use with caution!
|
|
|
|
|
2011-09-16 02:22:43 +00:00
|
|
|
# REPOSITORY SETUP COMMANDS
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `init [description]`
|
2011-08-17 18:43:38 +00:00
|
|
|
|
|
|
|
Until a repository (or one of its remotes) has been initialized,
|
2013-12-04 06:10:18 +00:00
|
|
|
git-annex will refuse to operate on it, to avoid accidentally
|
2011-08-17 18:43:38 +00:00
|
|
|
using it in a repository that was not intended to have an annex.
|
|
|
|
|
|
|
|
It's useful, but not mandatory, to initialize each new clone
|
2012-08-03 14:45:18 +00:00
|
|
|
of a repository with its own description. If you don't provide one,
|
2014-01-18 06:30:01 +00:00
|
|
|
one will be generated using the username, hostname and the path.
|
2011-03-03 20:58:52 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `describe repository description`
|
2011-03-03 20:58:52 +00:00
|
|
|
|
2011-03-29 02:05:11 +00:00
|
|
|
Changes the description of a repository.
|
2011-03-03 20:58:52 +00:00
|
|
|
|
|
|
|
The repository to describe can be specified by git remote name or
|
|
|
|
by uuid. To change the description of the current repository, use
|
2012-03-02 02:35:10 +00:00
|
|
|
"here".
|
2011-03-03 20:58:52 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `initremote name [param=value ...]`
|
2011-03-28 06:12:05 +00:00
|
|
|
|
2014-01-18 06:30:01 +00:00
|
|
|
Creates a new special remote, and adds it to `.git/config`.
|
2013-07-11 12:11:47 +00:00
|
|
|
|
2013-04-26 22:22:44 +00:00
|
|
|
The remote's configuration is specified by the parameters. Different
|
|
|
|
types of special remotes need different configuration values. The
|
|
|
|
command will prompt for parameters as needed.
|
|
|
|
|
2013-09-04 22:39:41 +00:00
|
|
|
All special remotes support encryption. You can either specify
|
2013-12-04 06:10:18 +00:00
|
|
|
`encryption=none` to disable encryption, or specify
|
|
|
|
`encryption=hybrid keyid=$keyid ...` to specify a GPG key id (or an email
|
2014-01-18 06:30:01 +00:00
|
|
|
address associated with a key).
|
2013-09-04 22:39:41 +00:00
|
|
|
|
|
|
|
There are actually three schemes that can be used for management of the
|
|
|
|
encryption keys. When using the encryption=hybrid scheme, additional
|
2013-12-04 06:10:18 +00:00
|
|
|
GPG keys can be given access to the encrypted special remote easily
|
2013-09-04 22:39:41 +00:00
|
|
|
(without re-encrypting everything). When using encryption=shared,
|
|
|
|
a shared key is generated and stored in the git repository, allowing
|
|
|
|
anyone who can clone the git repository to access it. Finally, when using
|
|
|
|
encryption=pubkey, content in the special remote is directly encrypted
|
2013-12-04 06:10:18 +00:00
|
|
|
to the specified GPG keys, and additional ones cannot easily be given
|
2013-09-04 22:39:41 +00:00
|
|
|
access.
|
2011-03-28 17:47:29 +00:00
|
|
|
|
2013-08-28 02:24:14 +00:00
|
|
|
Note that with encryption enabled, a cryptographic key is created.
|
|
|
|
This requires sufficient entropy. If initremote seems to hang or take
|
2013-12-04 06:10:18 +00:00
|
|
|
a long time while generating the key, you may want to Ctrl-c it and
|
2013-09-11 01:00:59 +00:00
|
|
|
re-run with `--fast`, which causes it to use a lower-quality source of
|
2013-08-28 02:24:14 +00:00
|
|
|
randomness.
|
2013-05-24 16:12:00 +00:00
|
|
|
|
2011-03-28 23:08:12 +00:00
|
|
|
Example Amazon S3 remote:
|
2011-03-28 06:12:05 +00:00
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
git annex initremote mys3 type=S3 encryption=hybrid keyid=me@example.com datacenter=EU
|
2013-04-26 22:22:44 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `enableremote name [param=value ...]`
|
2013-04-26 22:22:44 +00:00
|
|
|
|
|
|
|
Enables use of an existing special remote in the current repository,
|
|
|
|
which may be a different repository than the one in which it was
|
2013-12-04 06:10:18 +00:00
|
|
|
originally created with the initremote command.
|
2013-07-11 12:11:47 +00:00
|
|
|
|
2014-01-18 06:30:01 +00:00
|
|
|
The name of the remote is the same name used when originally
|
2013-04-26 22:22:44 +00:00
|
|
|
creating that remote with "initremote". Run "git annex enableremote"
|
|
|
|
with no parameters to get a list of special remote names.
|
|
|
|
|
|
|
|
Some special remotes may need parameters to be specified every time.
|
|
|
|
For example, the directory special remote requires a directory= parameter.
|
2013-07-11 12:11:47 +00:00
|
|
|
|
2013-04-26 22:22:44 +00:00
|
|
|
This command can also be used to modify the configuration of an existing
|
2013-09-04 22:39:41 +00:00
|
|
|
special remote, by specifying new values for parameters that were
|
|
|
|
originally set when using initremote. (However, some settings such as
|
|
|
|
the as the encryption scheme cannot be changed once a special remote
|
|
|
|
has been created.)
|
|
|
|
|
2014-01-18 06:30:01 +00:00
|
|
|
The GPG keys that an encrypted special remote is encrypted with can be
|
2013-09-04 22:39:41 +00:00
|
|
|
changed using the keyid+= and keyid-= parameters. These respectively
|
|
|
|
add and remove keys from the list. However, note that removing a key
|
|
|
|
does NOT necessarily prevent the key's owner from accessing data
|
|
|
|
in the encrypted special remote
|
|
|
|
(which is by design impossible, short of deleting the remote).
|
|
|
|
|
|
|
|
One use-case of keyid-= is to replace a revoked key with
|
|
|
|
a new key:
|
2013-08-28 02:24:14 +00:00
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
git annex enableremote mys3 keyid-=revokedkey keyid+=newkey
|
2011-03-28 06:12:05 +00:00
|
|
|
|
2013-09-04 22:39:41 +00:00
|
|
|
Also, note that for encrypted special remotes using plain public-key
|
2013-09-01 18:12:00 +00:00
|
|
|
encryption (encryption=pubkey), adding or removing a key has NO effect
|
|
|
|
on files that have already been copied to the remote. Hence using
|
|
|
|
keyid+= and keyid-= with such remotes should be used with care, and
|
2013-09-04 22:39:41 +00:00
|
|
|
make little sense except in cases like the revoked key example above.
|
2013-09-01 18:12:00 +00:00
|
|
|
|
2014-01-20 20:47:56 +00:00
|
|
|
* `numcopies [N]`
|
|
|
|
|
|
|
|
Tells git-annex how many copies it should preserve of files, over all
|
|
|
|
repositories. The default is 1.
|
|
|
|
|
|
|
|
Run without a number to get the current value.
|
|
|
|
|
|
|
|
When git-annex is asked to drop a file, it first verifies that the
|
|
|
|
required number of copies can be satisfied amoung all the other
|
|
|
|
repositories that have a copy of the file.
|
|
|
|
|
|
|
|
This can be overridden on a per-file basis by the annex.numcopies setting
|
|
|
|
in .gitattributes files.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `trust [repository ...]`
|
2011-09-16 02:22:43 +00:00
|
|
|
|
|
|
|
Records that a repository is trusted to not unexpectedly lose
|
|
|
|
content. Use with care.
|
|
|
|
|
2012-03-02 02:35:10 +00:00
|
|
|
To trust the current repository, use "here".
|
2011-09-16 02:22:43 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `untrust [repository ...]`
|
2011-09-16 02:22:43 +00:00
|
|
|
|
|
|
|
Records that a repository is not trusted and could lose content
|
|
|
|
at any time.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `semitrust [repository ...]`
|
2011-09-16 02:22:43 +00:00
|
|
|
|
|
|
|
Returns a repository to the default semi trusted state.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `dead [repository ...]`
|
2011-12-02 20:59:55 +00:00
|
|
|
|
2014-01-18 06:30:01 +00:00
|
|
|
Indicates that the repository has been irretrievably lost.
|
2011-12-02 20:59:55 +00:00
|
|
|
(To undo, use semitrust.)
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `group repository groupname`
|
2012-10-01 19:12:04 +00:00
|
|
|
|
|
|
|
Adds a repository to a group, such as "archival", "enduser", or "transfer".
|
|
|
|
The groupname must be a single word.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `ungroup repository groupname`
|
2012-10-01 19:12:04 +00:00
|
|
|
|
|
|
|
Removes a repository from a group.
|
|
|
|
|
2013-10-28 18:08:38 +00:00
|
|
|
* `wanted repository [expression]`
|
2013-05-25 16:44:58 +00:00
|
|
|
|
|
|
|
When run with an expression, configures the content that is preferred
|
|
|
|
to be held in the archive. See PREFERRED CONTENT below.
|
|
|
|
|
2013-06-02 14:35:50 +00:00
|
|
|
For example:
|
|
|
|
|
2013-10-28 18:08:38 +00:00
|
|
|
git annex wanted . "include=*.mp3 or include=*.ogg"
|
2013-06-02 14:35:50 +00:00
|
|
|
|
2013-05-25 16:44:58 +00:00
|
|
|
Without an expression, displays the current preferred content setting
|
|
|
|
of the repository.
|
|
|
|
|
2013-10-13 19:40:38 +00:00
|
|
|
* `schedule repository [expression]`
|
|
|
|
|
|
|
|
When run with an expression, configures scheduled jobs to run at a
|
|
|
|
particular time. This can be used to make the assistant periodically run
|
|
|
|
incremental fscks. See SCHEDULED JOBS below.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `vicfg`
|
2012-10-03 21:04:52 +00:00
|
|
|
|
|
|
|
Opens EDITOR on a temp file containing most of the above configuration
|
|
|
|
settings, and when it exits, stores any changes made back to the git-annex
|
|
|
|
branch.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `direct`
|
2012-12-13 19:44:56 +00:00
|
|
|
|
|
|
|
Switches a repository to use direct mode, where rather than symlinks to
|
2013-01-06 21:26:22 +00:00
|
|
|
files, the files are directly present in the repository.
|
2012-12-13 19:44:56 +00:00
|
|
|
|
|
|
|
As part of the switch to direct mode, any changed files will be committed.
|
|
|
|
|
2013-01-06 21:26:22 +00:00
|
|
|
Note that git commands that operate on the work tree are often unsafe to
|
|
|
|
use in direct mode repositories, and can result in data loss or other
|
|
|
|
bad behavior.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `indirect`
|
2012-12-13 19:44:56 +00:00
|
|
|
|
|
|
|
Switches a repository back from direct mode to the default, indirect mode.
|
2013-07-11 12:11:47 +00:00
|
|
|
|
2012-12-13 19:44:56 +00:00
|
|
|
As part of the switch from direct mode, any changed files will be committed.
|
|
|
|
|
2011-09-16 02:22:43 +00:00
|
|
|
# REPOSITORY MAINTENANCE COMMANDS
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `fsck [path ...]`
|
2010-11-15 22:04:19 +00:00
|
|
|
|
2010-12-30 20:52:24 +00:00
|
|
|
With no parameters, this command checks the whole annex for consistency,
|
2013-10-23 16:21:59 +00:00
|
|
|
and warns about or fixes any problems found. This is a good compliment to
|
|
|
|
`git fsck`.
|
2010-11-15 22:04:19 +00:00
|
|
|
|
|
|
|
With parameters, only the specified files are checked.
|
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
To check a remote to fsck, specify `--from`.
|
2012-09-25 17:19:05 +00:00
|
|
|
|
2012-09-25 20:48:24 +00:00
|
|
|
To avoid expensive checksum calculations (and expensive transfers when
|
2013-09-11 00:47:13 +00:00
|
|
|
fscking a remote), specify `--fast`.
|
2012-09-25 20:48:24 +00:00
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
To start a new incremental fsck, specify `--incremental`. Then
|
|
|
|
the next time you fsck, you can specify `--more` to skip over
|
2012-09-25 17:19:05 +00:00
|
|
|
files that have already been checked, and continue where it left off.
|
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
The `--incremental-schedule` option makes a new incremental fsck be
|
2012-09-25 23:37:34 +00:00
|
|
|
started a configurable time after the last incremental fsck was started.
|
2012-09-25 23:43:33 +00:00
|
|
|
Once the current incremental fsck has completely finished, it causes
|
|
|
|
a new one to start.
|
2013-07-11 12:11:47 +00:00
|
|
|
|
2012-09-25 23:37:34 +00:00
|
|
|
Maybe you'd like to run a fsck for 5 hours at night, picking up each
|
|
|
|
night where it left off. You'd like this to continue until all files
|
|
|
|
have been fscked. And once it's done, you'd like a new fsck pass to start,
|
|
|
|
but no more often than once a month. Then put this in a nightly cron job:
|
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
git annex fsck --incremental-schedule 30d --time-limit 5h
|
2012-09-25 23:37:34 +00:00
|
|
|
|
2013-07-11 12:11:46 +00:00
|
|
|
To verify data integrity only while disregarding required number of copies,
|
2013-09-11 00:47:13 +00:00
|
|
|
use `--numcopies=1`.
|
2013-07-11 12:11:46 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `unused`
|
2010-11-15 22:04:19 +00:00
|
|
|
|
2011-06-23 16:23:25 +00:00
|
|
|
Checks the annex for data that does not correspond to any files present
|
2011-09-28 21:48:45 +00:00
|
|
|
in any tag or branch, and prints a numbered list of the data.
|
2010-11-15 22:04:19 +00:00
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
To only show unused temp and bad files, specify `--fast`.
|
2011-03-27 22:34:30 +00:00
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
To check for annexed data on a remote, specify `--from`.
|
2011-04-03 00:59:41 +00:00
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
After running this command, you can use the `--unused` option to
|
2013-07-03 19:26:59 +00:00
|
|
|
operate on all the unused data that was found. For example, to
|
|
|
|
move all unused data to origin:
|
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
git annex unused; git annex move --unused --to origin
|
2013-07-03 19:26:59 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `dropunused [number|range ...]`
|
2010-11-15 22:04:19 +00:00
|
|
|
|
|
|
|
Drops the data corresponding to the numbers, as listed by the last
|
2010-11-15 22:22:50 +00:00
|
|
|
`git annex unused`
|
2010-11-15 22:04:19 +00:00
|
|
|
|
2012-05-02 17:15:19 +00:00
|
|
|
You can also specify ranges of numbers, such as "1-1000".
|
2013-11-18 21:24:18 +00:00
|
|
|
Or, specify "all" to drop all unused data.
|
2012-05-02 17:15:19 +00:00
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
To drop the data from a remote, specify `--from.`
|
2011-04-03 00:59:41 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `addunused [number|range ...]`
|
2012-05-02 18:59:05 +00:00
|
|
|
|
|
|
|
Adds back files for the content corresponding to the numbers or ranges,
|
|
|
|
as listed by the last `git annex unused`. The files will have names
|
|
|
|
starting with "unused."
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `fix [path ...]`
|
2011-09-16 02:22:43 +00:00
|
|
|
|
|
|
|
Fixes up symlinks that have become broken to again point to annexed content.
|
|
|
|
This is useful to run if you have been moving the symlinks around,
|
|
|
|
but is done automatically when committing a change with git too.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `upgrade`
|
2011-09-16 02:22:43 +00:00
|
|
|
|
|
|
|
Upgrades the repository to current layout.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `forget`
|
2013-08-28 19:57:42 +00:00
|
|
|
|
|
|
|
Causes the git-annex branch to be rewritten, throwing away historical
|
2013-08-31 21:38:33 +00:00
|
|
|
data about past locations of files. The resulting branch will use less
|
|
|
|
space, but `git annex log` will not be able to show where
|
|
|
|
files used to be located.
|
2013-12-04 06:10:18 +00:00
|
|
|
|
2013-08-31 21:38:33 +00:00
|
|
|
To also prune references to repositories that have been marked as dead,
|
2013-09-11 00:47:13 +00:00
|
|
|
specify `--drop-dead`.
|
2013-08-28 19:57:42 +00:00
|
|
|
|
|
|
|
When this rewritten branch is merged into other clones of
|
2013-09-11 00:47:13 +00:00
|
|
|
the repository, `git-annex` will automatically perform the same rewriting
|
|
|
|
to their local `git-annex` branches. So the forgetfulness will automatically
|
2013-12-04 06:10:18 +00:00
|
|
|
propagate out from its starting point until all repositories running
|
2013-08-28 19:57:42 +00:00
|
|
|
git-annex have forgotten their old history. (You may need to force
|
2013-11-22 20:04:20 +00:00
|
|
|
git to push the branch to any git repositories not running git-annex.)
|
2013-08-28 19:57:42 +00:00
|
|
|
|
2013-10-23 16:21:59 +00:00
|
|
|
* `repair`
|
|
|
|
|
2013-12-04 06:10:18 +00:00
|
|
|
This can repair many of the problems with git repositories that `git fsck`
|
2013-10-23 16:21:59 +00:00
|
|
|
detects, but does not itself fix. It's useful if a repository has become
|
2013-12-04 06:10:18 +00:00
|
|
|
badly damaged. One way this can happen is if a repository used by git-annex
|
2013-10-23 16:21:59 +00:00
|
|
|
is on a removable drive that gets unplugged at the wrong time.
|
2013-12-04 06:10:18 +00:00
|
|
|
|
2013-10-23 16:21:59 +00:00
|
|
|
This command can actually be used inside git repositories that do not
|
|
|
|
use git-annex at all; when used in a repository using git-annex, it
|
|
|
|
does additional repairs of the git-annex branch.
|
|
|
|
|
|
|
|
It works by deleting any corrupt objects from the git repository, and
|
2013-12-04 06:10:18 +00:00
|
|
|
retrieving all missing objects it can from the remotes of the repository.
|
2013-10-23 16:21:59 +00:00
|
|
|
|
|
|
|
If that is not sufficient to fully recover the repository, it can also
|
|
|
|
reset branches back to commits before the corruption happened, delete
|
|
|
|
branches that are no longer available due to the lost data, and remove any
|
|
|
|
missing files from the index. It will only do this if run with the
|
|
|
|
`--force` option, since that rewrites history and throws out missing data.
|
|
|
|
Note that the `--force` option never touches tags, even if they are no
|
|
|
|
longer usable due to missing data.
|
|
|
|
|
|
|
|
After running this command, you will probably want to run `git fsck` to
|
|
|
|
verify it fixed the repository. Note that fsck may still complain about
|
|
|
|
objects referenced by the reflog, or the stash, if they were unable to be
|
|
|
|
recovered. This command does not try to clean up either the reflog or the
|
|
|
|
stash.
|
|
|
|
|
|
|
|
It is also a good idea to run `git annex fsck --fast` after this command,
|
|
|
|
to make sure that the git-annex branch reflects reality.
|
|
|
|
|
2011-09-16 02:22:43 +00:00
|
|
|
# QUERY COMMANDS
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `find [path ...]`
|
2010-11-15 22:04:19 +00:00
|
|
|
|
2011-12-22 17:53:06 +00:00
|
|
|
Outputs a list of annexed files in the specified path. With no path,
|
|
|
|
finds files in the current directory and its subdirectories.
|
2010-11-15 22:04:19 +00:00
|
|
|
|
2011-12-22 17:53:06 +00:00
|
|
|
By default, only lists annexed files whose content is currently present.
|
2014-01-18 18:58:56 +00:00
|
|
|
This can be changed by specifying matching options. To list all
|
2013-09-11 00:47:13 +00:00
|
|
|
annexed files, present or not, specify `--include "*"`. To list all
|
|
|
|
annexed files whose content is not present, specify `--not --in=here`
|
2010-11-15 22:04:19 +00:00
|
|
|
|
2011-11-22 18:06:31 +00:00
|
|
|
To output filenames terminated with nulls, for use with xargs -0,
|
2013-09-11 00:47:13 +00:00
|
|
|
specify `--print0`. Or, a custom output formatting can be specified using
|
|
|
|
`--format`. The default output format is the same as `--format='${file}\\n'`
|
2011-12-22 22:31:44 +00:00
|
|
|
|
|
|
|
These variables are available for use in formats: file, key, backend,
|
2013-12-15 18:46:29 +00:00
|
|
|
bytesize, humansize, keyname, hashdirlower, hashdirmixed, mtime.
|
2011-11-22 18:06:31 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `whereis [path ...]`
|
2011-03-05 21:23:55 +00:00
|
|
|
|
2013-09-20 01:33:44 +00:00
|
|
|
Displays a information about where the contents of files are located.
|
2011-03-05 21:23:55 +00:00
|
|
|
|
2013-09-19 18:16:28 +00:00
|
|
|
* `list [path ...]`
|
2013-09-12 16:21:21 +00:00
|
|
|
|
|
|
|
Displays a table of remotes that contain the contents of the specified
|
2013-09-20 01:33:44 +00:00
|
|
|
files. This is similar to whereis but a more compact display. Only
|
|
|
|
configured remotes are shown by default; specify --allrepos to list
|
|
|
|
all repositories.
|
2013-09-12 16:21:21 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `log [path ...]`
|
2012-01-06 19:40:04 +00:00
|
|
|
|
|
|
|
Displays the location log for the specified file or files,
|
|
|
|
showing each repository they were added to ("+") and removed from ("-").
|
|
|
|
|
2013-12-04 06:10:18 +00:00
|
|
|
To limit how far back to search for location log changes, the options
|
2013-09-11 00:47:13 +00:00
|
|
|
`--since`, `--after`, `--until`, `--before`, and `--max-count` can be specified.
|
|
|
|
They are passed through to git log. For example, `--since "1 month ago"`
|
2012-01-06 21:24:03 +00:00
|
|
|
|
2014-01-18 06:30:01 +00:00
|
|
|
To generate output suitable for the gource visualization program,
|
2013-09-11 00:47:13 +00:00
|
|
|
specify `--gource`.
|
2012-01-07 22:13:12 +00:00
|
|
|
|
2013-11-07 16:45:59 +00:00
|
|
|
* `info [directory ...]`
|
2011-05-17 01:18:34 +00:00
|
|
|
|
|
|
|
Displays some statistics and other information, including how much data
|
2011-11-14 23:27:00 +00:00
|
|
|
is in the annex and a list of all known repositories.
|
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
To only show the data that can be gathered quickly, use `--fast`.
|
2011-05-17 01:18:34 +00:00
|
|
|
|
2013-11-07 16:45:59 +00:00
|
|
|
When a directory is specified, shows a differently formatted info
|
2014-01-18 18:58:56 +00:00
|
|
|
display for that directory. In this mode, all of the matching
|
2013-03-11 05:22:56 +00:00
|
|
|
options can be used to filter the files that will be included in
|
2013-11-07 16:45:59 +00:00
|
|
|
the information.
|
2013-03-11 05:22:56 +00:00
|
|
|
|
|
|
|
For example, suppose you want to run "git annex get .", but
|
|
|
|
would first like to see how much disk space that will use.
|
|
|
|
Then run:
|
|
|
|
|
2013-11-07 16:45:59 +00:00
|
|
|
git annex info --fast . --not --in here
|
2014-01-18 06:30:01 +00:00
|
|
|
|
2013-11-07 17:55:36 +00:00
|
|
|
* `version`
|
|
|
|
|
|
|
|
Shows the version of git-annex, as well as repository version information.
|
2013-03-11 05:22:56 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `map`
|
2011-02-03 22:55:12 +00:00
|
|
|
|
|
|
|
Helps you keep track of your repositories, and the connections between them,
|
|
|
|
by going out and looking at all the ones it can get to, and generating a
|
|
|
|
Graphviz file displaying it all. If the `dot` command is available, it is
|
2011-12-20 20:31:59 +00:00
|
|
|
used to display the file to your screen (using x11 backend). (To disable
|
2013-09-11 00:47:13 +00:00
|
|
|
this display, specify `--fast`)
|
2011-02-03 22:55:12 +00:00
|
|
|
|
2011-12-20 20:31:59 +00:00
|
|
|
This command only connects to hosts that the host it's run on can
|
2011-02-03 22:55:12 +00:00
|
|
|
directly connect to. It does not try to tunnel through intermediate hosts.
|
|
|
|
So it might not show all connections between the repositories in the network.
|
|
|
|
|
|
|
|
Also, if connecting to a host requires a password, you might have to enter
|
|
|
|
it several times as the map is being built.
|
|
|
|
|
|
|
|
Note that this subcommand can be used to graph any git repository; it
|
|
|
|
is not limited to git-annex repositories.
|
|
|
|
|
2011-09-16 02:22:43 +00:00
|
|
|
# UTILITY COMMANDS
|
|
|
|
|
2014-02-13 05:49:38 +00:00
|
|
|
* `metadata [path ...] [-s field=value -s field+=value -s field-=value ...]`
|
2014-02-13 01:12:22 +00:00
|
|
|
|
|
|
|
Each file can have any number of metadata fields attached to it,
|
|
|
|
which each in turn have any number of values. This sets metadata
|
2014-02-13 05:49:38 +00:00
|
|
|
for the specified file or files, or if run without any values, shows
|
|
|
|
the current metadata.
|
2014-02-13 01:12:22 +00:00
|
|
|
|
2014-02-13 05:49:38 +00:00
|
|
|
To set a field's value, removing any old value(s), use -s field=value.
|
2014-02-13 01:12:22 +00:00
|
|
|
|
2014-02-13 05:49:38 +00:00
|
|
|
To add an additional value, use -s field+=value.
|
2014-02-13 01:12:22 +00:00
|
|
|
|
2014-02-13 05:49:38 +00:00
|
|
|
To remove a value, use -s field-=value.
|
2014-02-13 01:12:22 +00:00
|
|
|
|
|
|
|
For example, to set some tags on a file:
|
|
|
|
|
2014-02-13 05:49:38 +00:00
|
|
|
git annex metadata annexscreencast.ogv -s tag+=video -s tag+=screencast
|
2014-02-13 01:12:22 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `migrate [path ...]`
|
2011-09-16 02:22:43 +00:00
|
|
|
|
|
|
|
Changes the specified annexed files to use the default key-value backend
|
2013-09-11 00:47:13 +00:00
|
|
|
(or the one specified with `--backend`). Only files whose content
|
2011-09-16 02:22:43 +00:00
|
|
|
is currently available are migrated.
|
|
|
|
|
|
|
|
Note that the content is also still available using the old key after
|
|
|
|
migration. Use `git annex unused` to find and remove the old key.
|
|
|
|
|
|
|
|
Normally, nothing will be done to files already using the new backend.
|
|
|
|
However, if a backend changes the information it uses to construct a key,
|
|
|
|
this can also be used to migrate files to use the new key format.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `reinject src dest`
|
2011-10-31 16:33:41 +00:00
|
|
|
|
2011-10-31 19:18:41 +00:00
|
|
|
Moves the src file into the annex as the content of the dest file.
|
|
|
|
This can be useful if you have obtained the content of a file from
|
|
|
|
elsewhere and want to put it in the local annex.
|
2011-10-31 16:33:41 +00:00
|
|
|
|
|
|
|
Automatically runs fsck on dest to check that the expected content was
|
|
|
|
provided.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
git annex reinject /tmp/foo.iso foo.iso
|
2011-10-31 16:33:41 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `unannex [path ...]`
|
2010-10-21 21:59:32 +00:00
|
|
|
|
2013-10-28 20:56:01 +00:00
|
|
|
Use this to undo an accidental `git annex add` command. It puts the
|
|
|
|
file back how it was before the add.
|
|
|
|
|
2013-11-12 01:51:19 +00:00
|
|
|
Note that for safety, the content of the file remains in the annex,
|
|
|
|
until you use `git annex unused` and `git annex dropunused`.
|
2011-02-02 01:26:19 +00:00
|
|
|
|
|
|
|
This is not the command you should use if you intentionally annexed a
|
|
|
|
file and don't want its contents any more. In that case you should use
|
|
|
|
`git annex drop` instead, and you can also `git rm` the file.
|
2010-10-21 21:59:32 +00:00
|
|
|
|
2013-10-28 20:56:01 +00:00
|
|
|
Normally this does a slow copy of the file. In `--fast` mode, it
|
|
|
|
instead makes a hard link from the file to the content in the annex.
|
|
|
|
But use --fast mode with caution, because editing the file will
|
|
|
|
change the content in the annex.
|
2011-07-04 20:06:28 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `uninit`
|
2010-12-03 04:33:41 +00:00
|
|
|
|
|
|
|
Use this to stop using git annex. It will unannex every file in the
|
|
|
|
repository, and remove all of git-annex's other data, leaving you with a
|
|
|
|
git repository plus the previously annexed files.
|
|
|
|
|
2011-09-16 02:22:43 +00:00
|
|
|
# PLUMBING COMMANDS
|
2010-10-19 19:59:40 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `pre-commit [path ...]`
|
2010-10-27 18:33:44 +00:00
|
|
|
|
2013-11-05 20:42:59 +00:00
|
|
|
This is meant to be called from git's pre-commit hook. `git annex init`
|
|
|
|
automatically creates a pre-commit hook using this.
|
|
|
|
|
2010-10-27 18:33:44 +00:00
|
|
|
Fixes up symlinks that are staged as part of a commit, to ensure they
|
2010-11-10 14:49:35 +00:00
|
|
|
point to annexed content. Also handles injecting changes to unlocked
|
|
|
|
files into the annex.
|
2010-10-27 18:33:44 +00:00
|
|
|
|
2013-12-15 18:02:23 +00:00
|
|
|
* `lookupkey [file ...]`
|
|
|
|
|
|
|
|
This plumbing-level command looks up the key used for a file in the
|
|
|
|
index. The key is output to stdout. If there is no key (because
|
2013-12-15 18:54:52 +00:00
|
|
|
the file is not present in the index, or is not a git-annex managed file),
|
2013-12-15 18:02:23 +00:00
|
|
|
nothing is output, and it exits nonzero.
|
|
|
|
|
2013-12-15 18:46:29 +00:00
|
|
|
* `examinekey [key ...]`
|
|
|
|
|
|
|
|
This plumbing-level command is given a key, and prints information
|
|
|
|
that can be determined purely by looking at the key.
|
|
|
|
|
|
|
|
To specify what information to print, use `--format`. Or use `--json`
|
|
|
|
to get all available information in JSON format.
|
|
|
|
|
|
|
|
The same variables can be used in the format string as can be used in
|
|
|
|
the format string of git annex find (except there is no file option
|
|
|
|
here).
|
|
|
|
|
|
|
|
For example, the location a key's value is stored (in indirect mode)
|
|
|
|
can be looked up by running:
|
2014-01-18 06:30:01 +00:00
|
|
|
|
2013-12-15 18:46:29 +00:00
|
|
|
git annex examinekey --format='.git/annex/objects/${hashdirmixed}${key}/${key}'
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `fromkey key file`
|
2010-10-21 20:30:16 +00:00
|
|
|
|
2011-07-01 19:39:30 +00:00
|
|
|
This plumbing-level command can be used to manually set up a file
|
2011-08-28 20:28:38 +00:00
|
|
|
in the git repository to link to a specified key.
|
2010-10-21 20:30:16 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `dropkey [key ...]`
|
2010-10-25 22:32:29 +00:00
|
|
|
|
2010-11-15 22:19:13 +00:00
|
|
|
This plumbing-level command drops the annexed data for the specified
|
|
|
|
keys from this repository.
|
2010-10-25 22:32:29 +00:00
|
|
|
|
|
|
|
This can be used to drop content for arbitrary keys, which do not need
|
|
|
|
to have a file in the git repository pointing at them.
|
|
|
|
|
2013-12-15 17:48:26 +00:00
|
|
|
* `transferkey`
|
|
|
|
|
|
|
|
This plumbing-level command is used to request a single key be
|
|
|
|
transferred. Either the --from or the --to option can be used to specify
|
|
|
|
the remote to use. A --file option can be used to hint at the file
|
|
|
|
associated with the key.
|
2012-08-24 21:23:58 +00:00
|
|
|
|
2013-12-19 20:51:57 +00:00
|
|
|
* `transferkeys`
|
|
|
|
|
|
|
|
This plumbing-level command is used by the assistant to transfer data.
|
|
|
|
It is fed instructions about the keys to transfer using an internal
|
|
|
|
stdio protocol, which is intentionally not documented (as it may change
|
|
|
|
at any time).
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `rekey [file key ...]`
|
2013-07-11 12:11:47 +00:00
|
|
|
|
2012-02-16 20:36:35 +00:00
|
|
|
This plumbing-level command is similar to migrate, but you specify
|
|
|
|
both the file, and the new key to use for it.
|
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
With `--force`, even files whose content is not currently available will
|
2012-02-16 20:36:35 +00:00
|
|
|
be rekeyed. Use with caution.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `test`
|
2013-02-27 19:35:07 +00:00
|
|
|
|
|
|
|
This runs git-annex's built-in test suite.
|
|
|
|
|
2014-01-21 04:08:43 +00:00
|
|
|
There are several parameters, provided by Haskell's tasty test framework.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `xmppgit`
|
2012-11-06 04:52:35 +00:00
|
|
|
|
|
|
|
This command is used internally to perform git pulls over XMPP.
|
|
|
|
|
2010-10-19 19:59:40 +00:00
|
|
|
# OPTIONS
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--force`
|
2010-10-19 19:59:40 +00:00
|
|
|
|
|
|
|
Force unsafe actions, such as dropping a file's content when no other
|
2011-06-29 15:42:00 +00:00
|
|
|
source of it can be verified to still exist, or adding ignored files.
|
|
|
|
Use with care.
|
2010-10-19 19:59:40 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--fast`
|
2011-03-22 21:41:06 +00:00
|
|
|
|
2014-01-18 06:30:01 +00:00
|
|
|
Enable less expensive, but also less thorough versions of some commands.
|
2011-03-27 22:34:30 +00:00
|
|
|
What is avoided depends on the command.
|
2011-03-22 21:41:06 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--auto`
|
2011-09-15 17:30:04 +00:00
|
|
|
|
2014-01-18 06:30:01 +00:00
|
|
|
Enable automatic mode. Commands that get, drop, or move file contents
|
2014-01-20 20:47:56 +00:00
|
|
|
will only do so when needed to help satisfy the setting of numcopies,
|
2012-10-08 17:16:53 +00:00
|
|
|
and preferred content configuration.
|
2011-09-15 17:30:04 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--all`
|
2013-07-03 17:02:42 +00:00
|
|
|
|
|
|
|
Operate on all data that has been stored in the git annex,
|
|
|
|
including old versions of files. This is the default behavior when
|
|
|
|
running git-annex in a bare repository; in a non-bare repository the
|
|
|
|
normal behavior is to only operate on specified files in the working
|
|
|
|
tree.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--unused`
|
2013-07-03 19:26:59 +00:00
|
|
|
|
|
|
|
Operate on all data that has been determined to be unused by
|
2013-07-03 19:27:14 +00:00
|
|
|
a previous run of `git-annex unused`.
|
2013-07-03 19:26:59 +00:00
|
|
|
|
2014-01-26 18:59:47 +00:00
|
|
|
* `--key=key`
|
|
|
|
|
|
|
|
Operate on only the specified key.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--quiet`
|
2010-10-25 22:32:29 +00:00
|
|
|
|
2011-09-01 19:16:31 +00:00
|
|
|
Avoid the default verbose display of what is done; only show errors
|
2010-10-25 22:32:29 +00:00
|
|
|
and progress displays.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--verbose`
|
2010-10-28 18:04:22 +00:00
|
|
|
|
2011-09-01 19:16:31 +00:00
|
|
|
Enable verbose display.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--json`
|
2011-09-01 19:16:31 +00:00
|
|
|
|
|
|
|
Rather than the normal output, generate JSON. This is intended to be
|
|
|
|
parsed by programs that use git-annex. Each line of output is a JSON
|
2014-01-18 06:30:01 +00:00
|
|
|
object. Note that JSON output is only usable with some git-annex commands,
|
|
|
|
like info, find, and whereis.
|
2010-10-28 18:04:22 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--debug`
|
2011-05-21 15:52:13 +00:00
|
|
|
|
|
|
|
Show debug messages.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--no-debug`
|
2013-06-18 00:41:17 +00:00
|
|
|
|
|
|
|
Disable debug messages.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--from=repository`
|
2010-10-23 00:35:39 +00:00
|
|
|
|
2011-04-03 00:59:41 +00:00
|
|
|
Specifies a repository that content will be retrieved from, or that
|
|
|
|
should otherwise be acted on.
|
|
|
|
|
2011-03-29 02:05:11 +00:00
|
|
|
It should be specified using the name of a configured remote.
|
2010-10-23 00:35:39 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--to=repository`
|
2010-10-21 21:59:32 +00:00
|
|
|
|
2011-04-03 00:59:41 +00:00
|
|
|
Specifies a repository that content will be sent to.
|
|
|
|
|
2011-03-29 02:05:11 +00:00
|
|
|
It should be specified using the name of a configured remote.
|
2010-10-21 21:59:32 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--numcopies=n`
|
2011-06-01 20:49:17 +00:00
|
|
|
|
2014-01-20 20:47:56 +00:00
|
|
|
Overrides the numcopies setting, forcing git-annex to ensure the
|
2014-01-18 06:30:01 +00:00
|
|
|
specified number of copies exist.
|
2012-10-28 23:26:18 +00:00
|
|
|
|
|
|
|
Note that setting numcopies to 0 is very unsafe.
|
2011-06-01 20:49:17 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--time-limit=time`
|
2012-09-25 20:48:24 +00:00
|
|
|
|
|
|
|
Limits how long a git-annex command runs. The time can be something
|
|
|
|
like "5h", or "30m" or even "45s" or "10d".
|
|
|
|
|
|
|
|
Note that git-annex may continue running a little past the specified
|
|
|
|
time limit, in order to finish processing a file.
|
|
|
|
|
2014-01-18 06:30:01 +00:00
|
|
|
Also, note that if the time limit prevents git-annex from doing all it
|
2012-09-25 20:48:24 +00:00
|
|
|
was asked to, it will exit with a special code, 101.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--trust=repository`
|
|
|
|
* `--semitrust=repository`
|
|
|
|
* `--untrust=repository`
|
2011-06-01 21:49:37 +00:00
|
|
|
|
|
|
|
Overrides trust settings for a repository. May be specified more than once.
|
2013-07-11 12:11:47 +00:00
|
|
|
|
2011-06-14 02:19:44 +00:00
|
|
|
The repository should be specified using the name of a configured remote,
|
|
|
|
or the UUID or description of a repository.
|
2011-06-01 21:49:37 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--trust-glacier-inventory`
|
2012-11-20 20:43:58 +00:00
|
|
|
|
|
|
|
Amazon Glacier inventories take hours to retrieve, and may not represent
|
|
|
|
the current state of a repository. So git-annex does not trust that
|
|
|
|
files that the inventory claims are in Glacier are really there.
|
|
|
|
This switch can be used to allow it to trust the inventory.
|
|
|
|
|
|
|
|
Be careful using this, especially if you or someone else might have recently
|
|
|
|
removed a file from Glacier. If you try to drop the only other copy of the
|
2014-01-18 06:30:01 +00:00
|
|
|
file, and this switch is enabled, you could lose data!
|
2012-11-20 20:43:58 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--backend=name`
|
2010-11-15 22:04:19 +00:00
|
|
|
|
2011-03-16 02:53:14 +00:00
|
|
|
Specifies which key-value backend to use. This can be used when
|
|
|
|
adding a file to the annex, or migrating a file. Once files
|
|
|
|
are in the annex, their backend is known and this option is not
|
|
|
|
necessary.
|
2010-11-15 22:04:19 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--format=value`
|
2011-12-22 22:31:44 +00:00
|
|
|
|
|
|
|
Specifies a custom output format. The value is a format string,
|
2011-12-22 23:56:31 +00:00
|
|
|
in which '${var}' is expanded to the value of a variable. To right-justify
|
|
|
|
a variable with whitespace, use '${var;width}' ; to left-justify
|
2011-12-23 01:23:11 +00:00
|
|
|
a variable, use '${var;-width}'; to escape unusual characters in a variable,
|
|
|
|
use '${escaped_var}'
|
|
|
|
|
|
|
|
Also, '\\n' is a newline, '\\000' is a NULL, etc.
|
2011-12-22 22:31:44 +00:00
|
|
|
|
2013-09-28 18:35:21 +00:00
|
|
|
* `--user-agent=value`
|
|
|
|
|
|
|
|
Overrides the User-Agent to use when downloading files from the web.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `-c name=value`
|
2011-07-14 20:44:23 +00:00
|
|
|
|
2014-01-18 06:30:01 +00:00
|
|
|
Overrides git configuration settings. May be specified multiple times.
|
2011-07-14 20:44:23 +00:00
|
|
|
|
2014-01-18 18:58:56 +00:00
|
|
|
# MATCHING OPTIONS
|
2011-09-18 22:24:10 +00:00
|
|
|
|
|
|
|
These options can all be specified multiple times, and can be combined to
|
|
|
|
limit which files git-annex acts on.
|
|
|
|
|
|
|
|
Arbitrarily complicated expressions can be built using these options.
|
|
|
|
For example:
|
|
|
|
|
2011-12-23 18:14:00 +00:00
|
|
|
--exclude '*.mp3' --and --not -( --in=usbdrive --or --in=archive -)
|
2011-09-18 22:24:10 +00:00
|
|
|
|
|
|
|
The above example prevents git-annex from working on mp3 files whose
|
|
|
|
file contents are present at either of two repositories.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--exclude=glob`
|
2011-09-18 22:24:10 +00:00
|
|
|
|
|
|
|
Skips files matching the glob pattern. The glob is matched relative to
|
2011-12-22 17:53:06 +00:00
|
|
|
the current directory. For example:
|
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
--exclude='*.mp3' --exclude='subdir/*'
|
2011-12-22 17:53:06 +00:00
|
|
|
|
2014-01-18 18:58:56 +00:00
|
|
|
Note that this will not match anything when using --all or --unused.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--include=glob`
|
2011-12-22 17:53:06 +00:00
|
|
|
|
2013-09-11 01:00:59 +00:00
|
|
|
Skips files not matching the glob pattern. (Same as `--not --exclude`.)
|
2011-12-22 17:53:06 +00:00
|
|
|
For example, to include only mp3 and ogg files:
|
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
--include='*.mp3' --or --include='*.ogg'
|
2011-09-18 22:24:10 +00:00
|
|
|
|
2014-01-18 18:58:56 +00:00
|
|
|
Note that this will not skip anything when using --all or --unused.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--in=repository`
|
2011-09-18 22:24:10 +00:00
|
|
|
|
|
|
|
Matches only files that git-annex believes have their contents present
|
2011-11-28 21:49:03 +00:00
|
|
|
in a repository. Note that it does not check the repository to verify
|
|
|
|
that it still has the content.
|
2011-09-18 22:24:10 +00:00
|
|
|
|
|
|
|
The repository should be specified using the name of a configured remote,
|
2011-09-19 00:41:51 +00:00
|
|
|
or the UUID or description of a repository. For the current repository,
|
2013-09-11 01:00:59 +00:00
|
|
|
use `--in=here`
|
2011-09-18 22:24:10 +00:00
|
|
|
|
2014-02-06 16:43:56 +00:00
|
|
|
* `--in=repository@{date}`
|
|
|
|
|
|
|
|
Matches files currently in the work tree whose content was present in
|
|
|
|
the repository on the given date.
|
|
|
|
|
|
|
|
The date is specified in the same syntax documented in
|
|
|
|
gitrevisions(7). Note that this uses the reflog, so dates far in the
|
|
|
|
past cannot be queried.
|
|
|
|
|
|
|
|
For example, you might need to run `git annex drop .` to temporarily
|
|
|
|
free up disk space. The next day, you can get back the files you dropped
|
|
|
|
using `git annex get . --in=here@{yesterday}`
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--copies=number`
|
2011-09-19 00:23:08 +00:00
|
|
|
|
|
|
|
Matches only files that git-annex believes to have the specified number
|
2011-11-28 21:49:03 +00:00
|
|
|
of copies, or more. Note that it does not check remotes to verify that
|
|
|
|
the copies still exist.
|
2011-09-19 00:23:08 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--copies=trustlevel:number`
|
2012-10-01 17:52:39 +00:00
|
|
|
|
|
|
|
Matches only files that git-annex believes have the specified number of
|
|
|
|
copies, on remotes with the specified trust level. For example,
|
2013-09-11 01:02:55 +00:00
|
|
|
`--copies=trusted:2`
|
2012-10-01 17:52:39 +00:00
|
|
|
|
2013-05-16 02:48:15 +00:00
|
|
|
To match any trust level at or higher than a given level,
|
2013-09-11 01:02:55 +00:00
|
|
|
use 'trustlevel+'. For example, `--copies=semitrusted+:2`
|
2013-04-03 03:40:13 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--copies=groupname:number`
|
2012-10-01 22:25:11 +00:00
|
|
|
|
|
|
|
Matches only files that git-annex believes have the specified number of
|
|
|
|
copies, on remotes in the specified group. For example,
|
2013-09-11 01:02:55 +00:00
|
|
|
`--copies=archive:2`
|
2012-10-01 22:25:11 +00:00
|
|
|
|
2014-01-21 22:46:39 +00:00
|
|
|
* `--lackingcopies=number`
|
Add and use numcopiesneeded preferred content expression.
* Add numcopiesneeded preferred content expression.
* Client, transfer, incremental backup, and archive repositories
now want to get content that does not yet have enough copies.
This means the asssistant will make copies of files that don't yet
meet the configured numcopies, even to places that would not normally want
the file.
For example, if numcopies is 4, and there are 2 client repos and
2 transfer repos, and 2 removable backup drives, the file will be sent
to both transfer repos in order to make 4 copies. Once a removable drive
get a copy of the file, it will be dropped from one transfer repo or the
other (but not both).
Another example, numcopies is 3 and there is a client that has a backup
removable drive and two small archive repos. Normally once one of the small
archives has a file, it will not be put into the other one. But, to satisfy
numcopies, the assistant will duplicate it into the other small archive
too, if the backup repo is not available to receive the file.
I notice that these examples are fairly unlikely setups .. the old behavior
was not too bad, but it's nice to finally have it really correct.
.. Almost. I have skipped checking the annex.numcopies .gitattributes
out of fear it will be too slow.
This commit was sponsored by Florian Schlegel.
2014-01-20 21:34:58 +00:00
|
|
|
|
|
|
|
Matches only files that git-annex believes need the specified number or
|
|
|
|
more additional copies to be made in order to satisfy their numcopies
|
2014-01-21 22:46:39 +00:00
|
|
|
settings.
|
Add and use numcopiesneeded preferred content expression.
* Add numcopiesneeded preferred content expression.
* Client, transfer, incremental backup, and archive repositories
now want to get content that does not yet have enough copies.
This means the asssistant will make copies of files that don't yet
meet the configured numcopies, even to places that would not normally want
the file.
For example, if numcopies is 4, and there are 2 client repos and
2 transfer repos, and 2 removable backup drives, the file will be sent
to both transfer repos in order to make 4 copies. Once a removable drive
get a copy of the file, it will be dropped from one transfer repo or the
other (but not both).
Another example, numcopies is 3 and there is a client that has a backup
removable drive and two small archive repos. Normally once one of the small
archives has a file, it will not be put into the other one. But, to satisfy
numcopies, the assistant will duplicate it into the other small archive
too, if the backup repo is not available to receive the file.
I notice that these examples are fairly unlikely setups .. the old behavior
was not too bad, but it's nice to finally have it really correct.
.. Almost. I have skipped checking the annex.numcopies .gitattributes
out of fear it will be too slow.
This commit was sponsored by Florian Schlegel.
2014-01-20 21:34:58 +00:00
|
|
|
|
2014-01-21 22:46:39 +00:00
|
|
|
* `--approxlackingcopies=number`
|
|
|
|
|
|
|
|
Like lackingcopies, but does not look at .gitattributes annex.numcopies
|
|
|
|
settings. This makes it significantly faster.
|
Add and use numcopiesneeded preferred content expression.
* Add numcopiesneeded preferred content expression.
* Client, transfer, incremental backup, and archive repositories
now want to get content that does not yet have enough copies.
This means the asssistant will make copies of files that don't yet
meet the configured numcopies, even to places that would not normally want
the file.
For example, if numcopies is 4, and there are 2 client repos and
2 transfer repos, and 2 removable backup drives, the file will be sent
to both transfer repos in order to make 4 copies. Once a removable drive
get a copy of the file, it will be dropped from one transfer repo or the
other (but not both).
Another example, numcopies is 3 and there is a client that has a backup
removable drive and two small archive repos. Normally once one of the small
archives has a file, it will not be put into the other one. But, to satisfy
numcopies, the assistant will duplicate it into the other small archive
too, if the backup repo is not available to receive the file.
I notice that these examples are fairly unlikely setups .. the old behavior
was not too bad, but it's nice to finally have it really correct.
.. Almost. I have skipped checking the annex.numcopies .gitattributes
out of fear it will be too slow.
This commit was sponsored by Florian Schlegel.
2014-01-20 21:34:58 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--inbackend=name`
|
2011-11-28 21:37:15 +00:00
|
|
|
|
|
|
|
Matches only files whose content is stored using the specified key-value
|
|
|
|
backend.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--inallgroup=groupname`
|
2012-10-08 19:18:58 +00:00
|
|
|
|
|
|
|
Matches only files that git-annex believes are present in all repositories
|
|
|
|
in the specified group.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--smallerthan=size`
|
|
|
|
* `--largerthan=size`
|
2012-10-08 17:39:18 +00:00
|
|
|
|
|
|
|
Matches only files whose content is smaller than, or larger than the
|
|
|
|
specified size.
|
2013-07-11 12:11:47 +00:00
|
|
|
|
2012-10-08 17:39:18 +00:00
|
|
|
The size can be specified with any commonly used units, for example,
|
|
|
|
"0.5 gb" or "100 KiloBytes"
|
|
|
|
|
2014-02-13 06:24:30 +00:00
|
|
|
* `--metadata field=value`
|
|
|
|
|
|
|
|
Matches only files that have a metadata field attached with the specified
|
|
|
|
value.
|
|
|
|
|
2013-10-28 18:50:17 +00:00
|
|
|
* `--want-get`
|
|
|
|
|
|
|
|
Matches files that the preferred content settings for the repository
|
|
|
|
make it want to get. Note that this will match even files that are
|
2014-01-18 06:30:01 +00:00
|
|
|
already present, unless limited with e.g., `--not --in .`
|
2014-01-18 18:58:56 +00:00
|
|
|
|
|
|
|
Note that this will not match anything when using --all or --unused.
|
2013-10-28 18:50:17 +00:00
|
|
|
|
|
|
|
* `--want-drop`
|
|
|
|
|
|
|
|
Matches files that the preferred content settings for the repository
|
|
|
|
make it want to drop. Note that this will match even files that have
|
2014-01-18 06:30:01 +00:00
|
|
|
already been dropped, unless limited with e.g., `--in .`
|
2014-01-18 18:58:56 +00:00
|
|
|
|
|
|
|
Note that this will not match anything when using --all or --unused.
|
2013-10-28 18:50:17 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--not`
|
2011-09-18 22:24:10 +00:00
|
|
|
|
2014-01-18 18:58:56 +00:00
|
|
|
Inverts the next matching option. For example, to only act on
|
2013-09-11 00:47:13 +00:00
|
|
|
files with less than 3 copies, use `--not --copies=3`
|
2011-09-18 22:24:10 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--and`
|
2011-09-18 22:24:10 +00:00
|
|
|
|
2014-01-18 18:58:56 +00:00
|
|
|
Requires that both the previous and the next matching option matches.
|
2011-09-18 22:24:10 +00:00
|
|
|
The default.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `--or`
|
2011-09-18 22:24:10 +00:00
|
|
|
|
2014-01-18 18:58:56 +00:00
|
|
|
Requires that either the previous, or the next matching option matches.
|
2011-09-18 22:24:10 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `-(`
|
2011-09-18 22:24:10 +00:00
|
|
|
|
2014-01-18 18:58:56 +00:00
|
|
|
Opens a group of matching options.
|
2011-09-18 22:24:10 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `-)`
|
2011-09-18 22:24:10 +00:00
|
|
|
|
2014-01-18 18:58:56 +00:00
|
|
|
Closes a group of matching options.
|
2011-09-18 22:24:10 +00:00
|
|
|
|
2013-03-29 20:17:13 +00:00
|
|
|
# PREFERRED CONTENT
|
|
|
|
|
|
|
|
Each repository has a preferred content setting, which specifies content
|
|
|
|
that the repository wants to have present. These settings can be configured
|
2013-10-28 18:08:38 +00:00
|
|
|
using `git annex vicfg` or `git annex wanted`.
|
2013-10-13 19:40:38 +00:00
|
|
|
They are used by the `--auto` option, and by the git-annex assistant.
|
2013-03-29 20:17:13 +00:00
|
|
|
|
|
|
|
The preferred content settings are similar, but not identical to
|
2014-01-18 18:58:56 +00:00
|
|
|
the matching options specified above, just without the dashes.
|
2013-03-29 20:17:13 +00:00
|
|
|
For example:
|
|
|
|
|
|
|
|
exclude=archive/* and (include=*.mp3 or smallerthan=1mb)
|
|
|
|
|
|
|
|
The main differences are that `exclude=` and `include=` always
|
|
|
|
match relative to the top of the git repository, and that there is
|
2013-09-11 00:47:13 +00:00
|
|
|
no equivilant to `--in`.
|
2013-03-29 20:17:13 +00:00
|
|
|
|
2013-10-06 17:02:17 +00:00
|
|
|
When a repository is in one of the standard predefined groups, like "backup"
|
|
|
|
and "client", setting its preferred content to "standard" will use a
|
2013-12-04 06:10:18 +00:00
|
|
|
built-in preferred content expression developed for that group.
|
2013-10-06 17:02:17 +00:00
|
|
|
|
2013-10-13 19:40:38 +00:00
|
|
|
# SCHEDULED JOBS
|
|
|
|
|
2013-10-15 17:42:33 +00:00
|
|
|
The git-annex assistant daemon can be configured to run scheduled jobs.
|
|
|
|
This is similar to cron and anacron (and you can use them if you prefer),
|
|
|
|
but has the advantage of being integrated into git-annex, and so being able
|
2014-01-18 06:30:01 +00:00
|
|
|
to e.g., fsck a repository on a removable drive when the drive gets
|
2013-10-13 19:40:38 +00:00
|
|
|
connected.
|
|
|
|
|
|
|
|
The scheduled jobs can be configured using `git annex vicfg` or
|
|
|
|
`git annex schedule`.
|
|
|
|
|
|
|
|
These actions are available: "fsck self", "fsck UUID" (where UUID
|
|
|
|
is the UUID of a remote to fsck). After the action comes the duration
|
|
|
|
to allow the action to run, and finally the schedule of when to run it.
|
|
|
|
|
|
|
|
To schedule multiple jobs, separate them with "; ".
|
|
|
|
|
|
|
|
Some examples:
|
|
|
|
|
|
|
|
fsck self 30m every day at any time
|
2013-10-15 17:42:33 +00:00
|
|
|
fsck self 1h every month at 3 AM
|
2013-10-13 19:40:38 +00:00
|
|
|
fsck self 1h on day 1 of every month at any time
|
2013-10-15 17:42:33 +00:00
|
|
|
fsck self 1h every week divisible by 2 at any time
|
2013-10-13 19:40:38 +00:00
|
|
|
|
|
|
|
# CONFIGURATION VIA .git/config
|
2010-10-19 19:59:40 +00:00
|
|
|
|
2010-11-28 21:54:42 +00:00
|
|
|
Like other git commands, git-annex is configured via `.git/config`.
|
2010-11-01 04:17:26 +00:00
|
|
|
Here are all the supported configuration settings.
|
2010-10-19 19:59:40 +00:00
|
|
|
|
2010-12-10 21:30:13 +00:00
|
|
|
* `annex.uuid`
|
|
|
|
|
|
|
|
A unique UUID for this repository (automatically set).
|
|
|
|
|
|
|
|
* `annex.backends`
|
|
|
|
|
2013-12-04 06:10:18 +00:00
|
|
|
Space-separated list of names of the key-value backends to use.
|
|
|
|
The first listed is used to store new files by default.
|
2010-12-10 21:30:13 +00:00
|
|
|
|
2011-10-14 22:23:17 +00:00
|
|
|
* `annex.diskreserve`
|
|
|
|
|
|
|
|
Amount of disk space to reserve. Disk space is checked when transferring
|
|
|
|
content to avoid running out, and additional free space can be reserved
|
|
|
|
via this option, to make space for more important content (such as git
|
|
|
|
commit logs). Can be specified with any commonly used units, for example,
|
2013-12-23 17:50:51 +00:00
|
|
|
"0.5 gb", "500M", or "100 KiloBytes"
|
2011-10-14 22:23:17 +00:00
|
|
|
|
|
|
|
The default reserve is 1 megabyte.
|
|
|
|
|
2013-03-29 20:17:13 +00:00
|
|
|
* `annex.largefiles`
|
|
|
|
|
|
|
|
Allows configuring which files `git annex add` and the assistant consider
|
|
|
|
to be large enough to need to be added to the annex. By default,
|
|
|
|
all files are added to the annex.
|
|
|
|
|
|
|
|
The value is a preferred content expression. See PREFERRED CONTENT
|
|
|
|
for details.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
2013-09-11 00:47:13 +00:00
|
|
|
annex.largefiles = largerthan=100kb and not (include=*.c or include=*.h)
|
2013-03-29 20:17:13 +00:00
|
|
|
|
2014-01-20 20:47:56 +00:00
|
|
|
* `annex.numcopies`
|
|
|
|
|
|
|
|
This is a deprecated setting. You should instead use the
|
|
|
|
`git annex numcopies` command to configure how many copies of files
|
|
|
|
are kept acros all repositories.
|
|
|
|
|
|
|
|
This config setting is only looked at when `git annex numcopies` has
|
|
|
|
never been configured.
|
|
|
|
|
|
|
|
Note that setting numcopies to 0 is very unsafe.
|
|
|
|
|
2012-02-15 15:13:13 +00:00
|
|
|
* `annex.queuesize`
|
|
|
|
|
|
|
|
git-annex builds a queue of git commands, in order to combine similar
|
|
|
|
commands for speed. By default the size of the queue is limited to
|
|
|
|
10240 commands; this can be used to change the size. If you have plenty
|
|
|
|
of memory and are working with very large numbers of files, increasing
|
|
|
|
the queue size can speed it up.
|
|
|
|
|
2012-03-12 20:18:14 +00:00
|
|
|
* `annex.bloomcapacity`
|
|
|
|
|
|
|
|
The `git annex unused` command uses a bloom filter to determine
|
|
|
|
what data is no longer used. The default bloom filter is sized to handle
|
|
|
|
up to 500000 keys. If your repository is larger than that,
|
|
|
|
you can adjust this to avoid `git annex unused` not noticing some unused
|
|
|
|
data files. Increasing this will make `git-annex unused` consume more memory;
|
2013-11-07 16:45:59 +00:00
|
|
|
run `git annex info` for memory usage numbers.
|
2012-03-12 20:18:14 +00:00
|
|
|
|
|
|
|
* `annex.bloomaccuracy`
|
|
|
|
|
|
|
|
Adjusts the accuracy of the bloom filter used by
|
2014-01-18 06:30:01 +00:00
|
|
|
`git annex unused`. The default accuracy is 1000 --
|
2012-03-12 20:18:14 +00:00
|
|
|
1 unused file out of 1000 will be missed by `git annex unused`. Increasing
|
|
|
|
the accuracy will make `git annex unused` consume more memory;
|
2013-11-07 16:45:59 +00:00
|
|
|
run `git annex info` for memory usage numbers.
|
2012-03-12 20:18:14 +00:00
|
|
|
|
2012-01-20 21:13:36 +00:00
|
|
|
* `annex.sshcaching`
|
|
|
|
|
2014-02-02 23:27:47 +00:00
|
|
|
By default, git-annex caches ssh connections using ssh's
|
|
|
|
ControlMaster and ControlPersist settings
|
2012-02-25 23:15:29 +00:00
|
|
|
(if built using a new enough ssh). To disable this, set to `false`.
|
2012-01-20 21:13:36 +00:00
|
|
|
|
2012-02-25 19:23:17 +00:00
|
|
|
* `annex.alwayscommit`
|
|
|
|
|
|
|
|
By default, git-annex automatically commits data to the git-annex branch
|
|
|
|
after each command is run. To disable these commits,
|
|
|
|
set to `false`. Then data will only be committed when
|
|
|
|
running `git annex merge` (or by automatic merges) or `git annex sync`.
|
|
|
|
|
2012-09-19 17:30:25 +00:00
|
|
|
* `annex.delayadd`
|
|
|
|
|
|
|
|
Makes the watch and assistant commands delay for the specified number of
|
|
|
|
seconds before adding a newly created file to the annex. Normally this
|
|
|
|
is not needed, because they already wait for all writers of the file
|
2012-12-28 20:42:11 +00:00
|
|
|
to close it. On Mac OSX, when not using direct mode this defaults to
|
|
|
|
1 second, to work around a bad interaction with software there.
|
2012-09-19 17:30:25 +00:00
|
|
|
|
assistant unused file handling
Make sanity checker run git annex unused daily, and queue up transfers
of unused files to any remotes that will have them. The transfer retrying
code works for us here, so eg when a backup disk remote is plugged in,
any transfers to it are done. Once the unused files reach a remote,
they'll be removed locally as unwanted.
If the setup does not cause unused files to go to a remote, they'll pile
up, and the sanity checker detects this using some heuristics that are
pretty good -- 1000 unused files, or 10% of disk used by unused files,
or more disk wasted by unused files than is left free. Once it detects
this, it pops up an alert in the webapp, with a button to take action.
TODO: Webapp UI to configure this, and also the ability to launch an
immediate cleanup of all unused files.
This commit was sponsored by Simon Michael.
2014-01-23 02:48:56 +00:00
|
|
|
* `annex.expireunused`
|
|
|
|
|
|
|
|
Controls what the assistant does about unused file contents
|
|
|
|
that are stored in the repository.
|
|
|
|
|
|
|
|
The default is `false`, which causes
|
|
|
|
all old and unused file contents to be retained, unless the assistant
|
|
|
|
is able to move them to some other repository (such as a backup repository).
|
|
|
|
|
|
|
|
Can be set to a time specification, like "7d" or "1m", and then
|
|
|
|
file contents that have been known to be unused for a week or a
|
|
|
|
month will be deleted.
|
|
|
|
|
2013-10-29 20:48:06 +00:00
|
|
|
* `annex.fscknudge`
|
|
|
|
|
|
|
|
When set to false, prevents the webapp from reminding you when using
|
|
|
|
repositories that lack consistency checks.
|
|
|
|
|
2013-11-22 20:04:20 +00:00
|
|
|
* `annex.autoupgrade`
|
|
|
|
|
|
|
|
When set to ask (the default), the webapp will check for new versions
|
|
|
|
and prompt if they should be upgraded to. When set to true, automatically
|
|
|
|
upgrades without prompting (on some supported platforms). When set to
|
|
|
|
false, disables any upgrade checking.
|
|
|
|
|
|
|
|
Note that upgrade checking is only done when git-annex is installed
|
|
|
|
from one of the prebuilt images from its website. This does not
|
2013-12-04 06:10:18 +00:00
|
|
|
bypass e.g., a Linux distribution's own upgrade handling code.
|
2013-11-22 20:04:20 +00:00
|
|
|
|
|
|
|
This setting also controls whether to restart the git-annex assistant
|
|
|
|
when the git-annex binary is detected to have changed. That is useful
|
|
|
|
no matter how you installed git-annex.
|
|
|
|
|
2013-02-14 18:10:36 +00:00
|
|
|
* `annex.autocommit`
|
|
|
|
|
|
|
|
Set to false to prevent the git-annex assistant from automatically
|
|
|
|
committing changes to files in the repository.
|
|
|
|
|
2013-06-18 00:41:17 +00:00
|
|
|
* `annex.debug`
|
|
|
|
|
|
|
|
Set to true to enable debug logging by default.
|
|
|
|
|
2013-03-29 20:17:13 +00:00
|
|
|
* `annex.version`
|
|
|
|
|
|
|
|
Automatically maintained, and used to automate upgrades between versions.
|
|
|
|
|
2012-12-07 17:17:13 +00:00
|
|
|
* `annex.direct`
|
|
|
|
|
2013-03-29 17:33:56 +00:00
|
|
|
Set to true when the repository is in direct mode. Should not be set
|
|
|
|
manually; use the "git annex direct" and "git annex indirect" commands
|
|
|
|
instead.
|
2012-12-07 17:17:13 +00:00
|
|
|
|
2013-02-14 18:10:36 +00:00
|
|
|
* `annex.crippledfilesystem`
|
2013-01-27 11:43:05 +00:00
|
|
|
|
2013-02-14 18:10:36 +00:00
|
|
|
Set to true if the repository is on a crippled filesystem, such as FAT,
|
|
|
|
which does not support symbolic links, or hard links, or unix permissions.
|
|
|
|
This is automatically probed by "git annex init".
|
2013-01-27 11:43:05 +00:00
|
|
|
|
2010-12-10 21:30:13 +00:00
|
|
|
* `remote.<name>.annex-cost`
|
|
|
|
|
|
|
|
When determining which repository to
|
2010-10-09 18:06:25 +00:00
|
|
|
transfer annexed files from or to, ones with lower costs are preferred.
|
2010-10-13 00:26:02 +00:00
|
|
|
The default cost is 100 for local repositories, and 200 for remote
|
2010-11-01 04:26:47 +00:00
|
|
|
repositories.
|
2010-12-10 21:30:13 +00:00
|
|
|
|
2011-08-18 16:20:47 +00:00
|
|
|
* `remote.<name>.annex-cost-command`
|
|
|
|
|
|
|
|
If set, the command is run, and the number it outputs is used as the cost.
|
2014-01-18 06:30:01 +00:00
|
|
|
This allows varying the cost based on e.g., the current network. The
|
2011-08-18 16:20:47 +00:00
|
|
|
cost-command can be any shell command line.
|
|
|
|
|
2012-03-04 20:00:24 +00:00
|
|
|
* `remote.<name>.annex-start-command`
|
|
|
|
|
|
|
|
A command to run when git-annex begins to use the remote. This can
|
|
|
|
be used to, for example, mount the directory containing the remote.
|
|
|
|
|
2012-03-16 20:03:04 +00:00
|
|
|
The command may be run repeatedly when multiple git-annex processes
|
2012-03-04 20:00:24 +00:00
|
|
|
are running concurrently.
|
|
|
|
|
|
|
|
* `remote.<name>.annex-stop-command`
|
|
|
|
|
|
|
|
A command to run when git-annex is done using the remote.
|
|
|
|
|
|
|
|
The command will only be run once *all* running git-annex processes
|
|
|
|
are finished using the remote.
|
|
|
|
|
2010-12-10 21:30:13 +00:00
|
|
|
* `remote.<name>.annex-ignore`
|
|
|
|
|
|
|
|
If set to `true`, prevents git-annex
|
2013-04-22 18:57:09 +00:00
|
|
|
from storing file contents on this remote by default.
|
2013-09-11 00:47:13 +00:00
|
|
|
(You can still request it be used by the `--from` and `--to` options.)
|
2011-01-25 22:54:34 +00:00
|
|
|
|
2011-03-03 19:59:16 +00:00
|
|
|
This is, for example, useful if the remote is located somewhere
|
2011-04-09 19:57:45 +00:00
|
|
|
without git-annex-shell. (For example, if it's on GitHub).
|
2011-03-03 19:59:16 +00:00
|
|
|
Or, it could be used if the network connection between two
|
|
|
|
repositories is too slow to be used normally.
|
2010-12-10 21:30:13 +00:00
|
|
|
|
2013-04-22 18:57:09 +00:00
|
|
|
This does not prevent git-annex sync (or the git-annex assistant) from
|
|
|
|
syncing the git repository to the remote.
|
|
|
|
|
2012-10-11 22:39:21 +00:00
|
|
|
* `remote.<name>.annex-sync`
|
|
|
|
|
|
|
|
If set to `false`, prevents git-annex sync (and the git-annex assistant)
|
|
|
|
from syncing with this remote.
|
|
|
|
|
2014-01-02 17:12:32 +00:00
|
|
|
* `remote.<name>.annex-readonly`
|
|
|
|
|
|
|
|
If set to `true`, prevents git-annex from making changes to a remote.
|
|
|
|
This both prevents git-annex sync from pushing changes, and prevents
|
|
|
|
storing or removing files from read-only remote.
|
|
|
|
|
2011-10-14 22:17:46 +00:00
|
|
|
* `remote.<name>.annexUrl`
|
|
|
|
|
|
|
|
Can be used to specify a different url than the regular `remote.<name>.url`
|
|
|
|
for git-annex to use when talking with the remote. Similar to the `pushUrl`
|
|
|
|
used by git-push.
|
|
|
|
|
2010-12-10 21:30:13 +00:00
|
|
|
* `remote.<name>.annex-uuid`
|
|
|
|
|
2011-03-29 02:05:11 +00:00
|
|
|
git-annex caches UUIDs of remote repositories here.
|
2010-12-10 21:30:13 +00:00
|
|
|
|
2012-01-10 03:31:44 +00:00
|
|
|
* `remote.<name>.annex-trustlevel`
|
|
|
|
|
|
|
|
Configures a local trust level for the remote. This overrides the value
|
|
|
|
configured by the trust and untrust commands. The value can be any of
|
|
|
|
"trusted", "semitrusted" or "untrusted".
|
|
|
|
|
2014-01-26 17:03:25 +00:00
|
|
|
* `remote.<name>.annex-availability`
|
2014-01-13 18:41:10 +00:00
|
|
|
|
|
|
|
Can be used to tell git-annex whether a remote is LocallyAvailable
|
|
|
|
or GloballyAvailable. Normally, git-annex determines this automatically.
|
|
|
|
|
2014-01-26 17:03:25 +00:00
|
|
|
* `remote.<name>.annex-bare`
|
|
|
|
|
|
|
|
Can be used to tell git-annex if a remote is a bare repository
|
|
|
|
or not. Normally, git-annex determines this automatically.
|
|
|
|
|
2010-12-10 21:30:13 +00:00
|
|
|
* `remote.<name>.annex-ssh-options`
|
|
|
|
|
2011-03-29 02:05:11 +00:00
|
|
|
Options to use when using ssh to talk to this remote.
|
2010-12-10 21:30:13 +00:00
|
|
|
|
|
|
|
* `remote.<name>.annex-rsync-options`
|
|
|
|
|
|
|
|
Options to use when using rsync
|
2011-03-29 02:05:11 +00:00
|
|
|
to or from this remote. For example, to force ipv6, and limit
|
2013-09-11 01:02:55 +00:00
|
|
|
the bandwidth to 100Kbyte/s, set it to `-6 --bwlimit 100`
|
2010-12-10 21:30:13 +00:00
|
|
|
|
2014-02-02 20:06:34 +00:00
|
|
|
* `remote.<name>.annex-rsync-upload-options`
|
|
|
|
|
|
|
|
Options to use when using rsync to upload a file to a remote.
|
|
|
|
|
|
|
|
These options are passed after other applicable rsync options,
|
|
|
|
so can be used to override them. For example, to limit upload bandwidth
|
|
|
|
to 10Kbye/s, set `--bwlimit 10`.
|
|
|
|
|
|
|
|
* `remote.<name>.annex-rsync-download-options`
|
|
|
|
|
|
|
|
Options to use when using rsync to download a file from a remote.
|
|
|
|
|
|
|
|
These options are passed after other applicable rsync options,
|
|
|
|
so can be used to override them.
|
|
|
|
|
2013-04-13 22:10:49 +00:00
|
|
|
* `remote.<name>.annex-rsync-transport`
|
|
|
|
|
|
|
|
The remote shell to use to connect to the rsync remote. Possible
|
|
|
|
values are `ssh` (the default) and `rsh`, together with their
|
|
|
|
arguments, for instance `ssh -p 2222 -c blowfish`; Note that the
|
|
|
|
remote hostname should not appear there, see rsync(1) for details.
|
|
|
|
When the transport used is `ssh`, connections are automatically cached
|
|
|
|
unless `annex.sshcaching` is unset.
|
|
|
|
|
2011-04-08 18:56:57 +00:00
|
|
|
* `remote.<name>.annex-bup-split-options`
|
2010-12-10 21:30:13 +00:00
|
|
|
|
2011-04-08 18:56:57 +00:00
|
|
|
Options to pass to bup split when storing content in this remote.
|
2013-09-11 01:02:55 +00:00
|
|
|
For example, to limit the bandwidth to 100Kbyte/s, set it to `--bwlimit 100k`
|
2011-04-08 18:56:57 +00:00
|
|
|
(There is no corresponding option for bup join.)
|
|
|
|
|
2013-03-11 01:33:13 +00:00
|
|
|
* `remote.<name>.annex-gnupg-options`
|
2011-04-08 18:56:57 +00:00
|
|
|
|
2013-03-11 01:33:13 +00:00
|
|
|
Options to pass to GnuPG for symmetric encryption. For instance, to
|
|
|
|
use the AES cipher with a 256 bits key and disable compression, set it
|
2013-09-11 01:02:55 +00:00
|
|
|
to `--cipher-algo AES256 --compress-algo none`. (These options take
|
2013-03-11 01:33:13 +00:00
|
|
|
precedence over the default GnuPG configuration, which is otherwise
|
|
|
|
used.)
|
|
|
|
|
2014-02-02 20:06:34 +00:00
|
|
|
* `annex.ssh-options`, `annex.rsync-options`,
|
|
|
|
`annex.rsync-upload-options`, `annex.rsync-download-options`,
|
|
|
|
`annex.bup-split-options`, `annex.gnupg-options`
|
2013-03-11 01:33:13 +00:00
|
|
|
|
2014-02-02 20:06:34 +00:00
|
|
|
Default options to use if a remote does not have more specific options
|
|
|
|
as described above.
|
2010-12-10 21:30:13 +00:00
|
|
|
|
2012-03-22 03:41:01 +00:00
|
|
|
* `annex.web-options`
|
|
|
|
|
|
|
|
Options to use when using wget or curl to download a file from the web.
|
2013-04-09 03:34:05 +00:00
|
|
|
(wget is always used in preference to curl if available.)
|
2012-03-22 03:41:01 +00:00
|
|
|
For example, to force ipv4 only, set it to "-4"
|
|
|
|
|
2013-08-22 22:25:21 +00:00
|
|
|
* `annex.quvi-options`
|
|
|
|
|
|
|
|
Options to pass to quvi when using it to find the url to download for a
|
|
|
|
video.
|
|
|
|
|
2012-04-22 05:13:09 +00:00
|
|
|
* `annex.http-headers`
|
|
|
|
|
|
|
|
HTTP headers to send when downloading from the web. Multiple lines of
|
|
|
|
this option can be set, one per header.
|
|
|
|
|
|
|
|
* `annex.http-headers-command`
|
|
|
|
|
|
|
|
If set, the command is run and each line of its output is used as a HTTP
|
|
|
|
header. This overrides annex.http-headers.
|
|
|
|
|
2013-04-09 03:34:05 +00:00
|
|
|
* `annex.web-download-command`
|
|
|
|
|
|
|
|
Use to specify a command to run to download a file from the web.
|
|
|
|
(The default is to use wget or curl.)
|
|
|
|
|
|
|
|
In the command line, %url is replaced with the url to download,
|
|
|
|
and %file is replaced with the file that it should be saved to.
|
2014-01-24 16:58:52 +00:00
|
|
|
|
|
|
|
* `annex.secure-erase-command`
|
|
|
|
|
|
|
|
This can be set to a command that should be run whenever git-annex
|
|
|
|
removes the content of a file from the repository.
|
|
|
|
|
|
|
|
In the command line, %file is replaced with the file that should be
|
|
|
|
erased.
|
|
|
|
|
|
|
|
For example, to use the wipe command, set it to `wipe -f %file`
|
2013-04-09 03:34:05 +00:00
|
|
|
|
2012-03-16 20:00:08 +00:00
|
|
|
* `remote.<name>.rsyncurl`
|
|
|
|
|
2012-03-22 03:41:01 +00:00
|
|
|
Used by rsync special remotes, this configures
|
2012-11-18 02:09:29 +00:00
|
|
|
the location of the rsync repository to use. Normally this is automatically
|
2012-03-16 20:00:08 +00:00
|
|
|
set up by `git annex initremote`, but you can change it if needed.
|
|
|
|
|
2011-04-09 19:57:45 +00:00
|
|
|
* `remote.<name>.buprepo`
|
|
|
|
|
|
|
|
Used by bup special remotes, this configures
|
2012-11-18 02:09:29 +00:00
|
|
|
the location of the bup repository to use. Normally this is automatically
|
2011-04-09 19:57:45 +00:00
|
|
|
set up by `git annex initremote`, but you can change it if needed.
|
|
|
|
|
|
|
|
* `remote.<name>.directory`
|
|
|
|
|
|
|
|
Used by directory special remotes, this configures
|
|
|
|
the location of the directory where annexed files are stored for this
|
2012-11-18 02:09:29 +00:00
|
|
|
remote. Normally this is automatically set up by `git annex initremote`,
|
2011-04-09 19:57:45 +00:00
|
|
|
but you can change it if needed.
|
|
|
|
|
|
|
|
* `remote.<name>.s3`
|
|
|
|
|
|
|
|
Used to identify Amazon S3 special remotes.
|
2012-11-18 02:09:29 +00:00
|
|
|
Normally this is automatically set up by `git annex initremote`.
|
2011-03-28 06:12:05 +00:00
|
|
|
|
2012-11-20 20:43:58 +00:00
|
|
|
* `remote.<name>.glacier`
|
|
|
|
|
|
|
|
Used to identify Amazon Glacier special remotes.
|
|
|
|
Normally this is automatically set up by `git annex initremote`.
|
|
|
|
|
2012-11-15 19:42:07 +00:00
|
|
|
* `remote.<name>.webdav`
|
|
|
|
|
|
|
|
Used to identify webdav special remotes.
|
2012-11-18 02:09:29 +00:00
|
|
|
Normally this is automatically set up by `git annex initremote`.
|
2012-11-15 19:42:07 +00:00
|
|
|
|
2014-01-08 20:14:37 +00:00
|
|
|
* `remote.<name>.tahoe`
|
|
|
|
|
|
|
|
Used to identify tahoe special remotes.
|
|
|
|
Points to the configuration directory for tahoe.
|
|
|
|
|
2012-11-05 21:43:17 +00:00
|
|
|
* `remote.<name>.annex-xmppaddress`
|
|
|
|
|
|
|
|
Used to identify the XMPP address of a Jabber buddy.
|
|
|
|
Normally this is set up by the git-annex assistant when pairing over XMPP.
|
|
|
|
|
2013-09-24 21:25:47 +00:00
|
|
|
* `remote.<name>.gcrypt`
|
|
|
|
|
|
|
|
Used to identify gcrypt special remotes.
|
|
|
|
Normally this is automatically set up by `git annex initremote`.
|
|
|
|
|
|
|
|
It is set to "true" if this is a gcrypt remote.
|
|
|
|
If the gcrypt remote is accessible over ssh and has git-annex-shell
|
2014-01-18 06:30:01 +00:00
|
|
|
available to manage it, it's set to "shell".
|
2013-09-24 21:25:47 +00:00
|
|
|
|
2013-12-29 17:41:53 +00:00
|
|
|
* `remote.<name>.hooktype`, `remote.<name>.externaltype`
|
|
|
|
|
|
|
|
Used by hook special remotes and external special remotes to record
|
|
|
|
the type of the remote.
|
|
|
|
|
2010-12-10 21:30:13 +00:00
|
|
|
# CONFIGURATION VIA .gitattributes
|
2010-10-09 18:06:25 +00:00
|
|
|
|
2011-08-28 20:28:38 +00:00
|
|
|
The key-value backend used when adding a new file to the annex can be
|
|
|
|
configured on a per-file-type basis via `.gitattributes` files. In the file,
|
2010-11-28 22:58:03 +00:00
|
|
|
the `annex.backend` attribute can be set to the name of the backend to
|
2010-11-01 18:49:05 +00:00
|
|
|
use. For example, this here's how to use the WORM backend by default,
|
2012-09-12 17:22:16 +00:00
|
|
|
but the SHA256E backend for ogg files:
|
2010-11-01 18:49:05 +00:00
|
|
|
|
2010-11-28 22:58:03 +00:00
|
|
|
* annex.backend=WORM
|
2012-09-12 17:22:16 +00:00
|
|
|
*.ogg annex.backend=SHA256E
|
2010-11-01 18:49:05 +00:00
|
|
|
|
2010-11-28 19:28:20 +00:00
|
|
|
The numcopies setting can also be configured on a per-file-type basis via
|
2013-04-02 05:20:15 +00:00
|
|
|
the `annex.numcopies` attribute in `.gitattributes` files. This overrides
|
2014-01-20 20:47:56 +00:00
|
|
|
other numcopies settings.
|
|
|
|
For example, this makes two copies be needed for wav files and 3 copies
|
|
|
|
for flac files:
|
2010-11-28 19:28:20 +00:00
|
|
|
|
2010-11-28 22:55:49 +00:00
|
|
|
*.wav annex.numcopies=2
|
2014-01-20 20:47:56 +00:00
|
|
|
*.flac annex.numcopies=3
|
2013-07-11 12:11:47 +00:00
|
|
|
|
2012-10-28 23:26:18 +00:00
|
|
|
Note that setting numcopies to 0 is very unsafe.
|
2010-11-28 19:28:20 +00:00
|
|
|
|
2010-10-19 19:59:40 +00:00
|
|
|
# FILES
|
|
|
|
|
2012-08-02 04:42:33 +00:00
|
|
|
These files are used by git-annex:
|
2010-10-19 19:59:40 +00:00
|
|
|
|
2012-08-02 04:42:33 +00:00
|
|
|
`.git/annex/objects/` in your git repository contains the annexed file
|
|
|
|
contents that are currently available. Annexed files in your git
|
|
|
|
repository symlink to that content.
|
|
|
|
|
|
|
|
`.git/annex/` in your git repository contains other run-time information
|
|
|
|
used by git-annex.
|
|
|
|
|
|
|
|
`~/.config/git-annex/autostart` is a list of git repositories
|
|
|
|
to start the git-annex assistant in.
|
2010-10-19 19:59:40 +00:00
|
|
|
|
2010-10-27 18:40:50 +00:00
|
|
|
# SEE ALSO
|
|
|
|
|
2014-01-18 06:30:01 +00:00
|
|
|
Most of git-annex's documentation is available on its web site,
|
2010-10-27 18:40:50 +00:00
|
|
|
<http://git-annex.branchable.com/>
|
|
|
|
|
|
|
|
If git-annex is installed from a package, a copy of its documentation
|
2014-01-18 06:30:01 +00:00
|
|
|
should be included, in, for example, `/usr/share/doc/git-annex/`.
|
2010-10-27 18:40:50 +00:00
|
|
|
|
2010-10-19 19:59:40 +00:00
|
|
|
# AUTHOR
|
|
|
|
|
2010-11-01 04:28:52 +00:00
|
|
|
Joey Hess <joey@kitenet.net>
|
2010-10-16 19:58:42 +00:00
|
|
|
|
2010-10-19 20:17:29 +00:00
|
|
|
<http://git-annex.branchable.com/>
|
|
|
|
|
2014-01-18 06:30:01 +00:00
|
|
|
Warning: Automatically converted into a man page by mdwn2man. Edit with care.
|