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
|
|
|
|
git and versioned like regular files. You can move them around, delete
|
|
|
|
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
|
|
|
|
|
|
|
Like many git commands, git-annex can be passed a path that
|
|
|
|
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
|
|
|
|
|
|
|
* add [path ...]
|
|
|
|
|
|
|
|
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.
|
2012-01-03 04:09:09 +00:00
|
|
|
(Use --force to add ignored files.) Dotfiles are skipped unless explicitly
|
|
|
|
listed.
|
2010-10-19 19:59:40 +00:00
|
|
|
|
|
|
|
* get [path ...]
|
|
|
|
|
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,
|
|
|
|
but you can override this using the --from option.
|
|
|
|
|
2010-10-19 19:59:40 +00:00
|
|
|
* drop [path ...]
|
|
|
|
|
|
|
|
Drops the content of annexed files from this repository.
|
|
|
|
|
2011-09-15 17:30:04 +00:00
|
|
|
git-annex will refuse to drop content if it cannot verify it is
|
2011-10-28 21:26:38 +00:00
|
|
|
safe to do so. This can be overridden with the --force switch.
|
|
|
|
|
|
|
|
To drop content from a remote, specify --from.
|
2011-09-15 17:30:04 +00:00
|
|
|
|
2010-10-21 21:59:32 +00:00
|
|
|
* move [path ...]
|
2011-03-27 22:34:30 +00:00
|
|
|
|
|
|
|
When used with the --from option, moves the content of annexed files
|
|
|
|
from the specified repository to the current one.
|
2010-10-19 19:59:40 +00:00
|
|
|
|
2010-10-23 16:41:13 +00:00
|
|
|
When used with the --to option, moves the content of annexed files from
|
|
|
|
the current repository to the specified one.
|
2010-10-21 21:59:32 +00:00
|
|
|
|
2010-11-27 21:02:53 +00:00
|
|
|
* copy [path ...]
|
|
|
|
|
2011-03-27 22:34:30 +00:00
|
|
|
When used with the --from option, copies the content of annexed files
|
|
|
|
from the specified repository to the current one.
|
|
|
|
|
2010-11-27 21:02:53 +00:00
|
|
|
When used with the --to option, copies the content of annexed files from
|
|
|
|
the current repository to the specified one.
|
|
|
|
|
2011-03-27 22:34:30 +00:00
|
|
|
To avoid contacting the remote to check if it has every file, specify --fast
|
2010-11-27 21:02:53 +00:00
|
|
|
|
2011-03-03 20:58:52 +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.
|
|
|
|
Unlocking a annexed file allows it to be modified. This replaces the
|
|
|
|
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.
|
|
|
|
|
|
|
|
* edit [path ...]
|
|
|
|
|
|
|
|
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
|
|
|
|
2010-11-09 19:11:45 +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
|
|
|
|
2011-12-30 23:45:23 +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
|
2011-12-30 23:45:23 +00:00
|
|
|
one or more of its remotes. You can specifiy the remotes to sync with;
|
2011-12-31 01:17:36 +00:00
|
|
|
the default is to sync with all remotes. Or specify --fast to sync with
|
|
|
|
the remotes with the lowest annex-cost value.
|
2011-12-30 23:45:23 +00:00
|
|
|
|
2012-01-02 18:20:51 +00:00
|
|
|
The sync process involves first committing all local changes (git commit -a),
|
|
|
|
then fetching and merging the `synced/master` and the `git-annex` branch
|
2011-12-30 23:45:23 +00:00
|
|
|
from the remote repositories and finally pushing the changes back to
|
|
|
|
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.
|
|
|
|
|
|
|
|
Note that syncing with a remote will not update the remote's working
|
|
|
|
tree with changes made to the local repository. However, those changes
|
|
|
|
are pushed to the remote, so can be merged into its working tree
|
|
|
|
by running "git annex sync" on the remote.
|
2011-12-27 18:23:41 +00:00
|
|
|
|
2011-12-30 21:54:09 +00:00
|
|
|
Note that sync does not transfer any file contents from or to the remote
|
|
|
|
repositories.
|
2011-12-10 00:27:22 +00:00
|
|
|
|
2011-09-16 02:22:43 +00:00
|
|
|
* addurl [url ...]
|
|
|
|
|
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
|
|
|
|
2012-02-08 19:35:18 +00:00
|
|
|
To avoid immediately downloading the url, specify --fast.
|
|
|
|
|
|
|
|
To specify what file the url is added to, specify --file. 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
|
|
|
|
|
|
|
# REPOSITORY SETUP COMMANDS
|
|
|
|
|
2011-08-29 18:13:38 +00:00
|
|
|
* init [description]
|
2011-08-17 18:43:38 +00:00
|
|
|
|
|
|
|
Until a repository (or one of its remotes) has been initialized,
|
|
|
|
git-annex will refuse to operate on it, to avoid accidentially
|
|
|
|
using it in a repository that was not intended to have an annex.
|
|
|
|
|
|
|
|
It's useful, but not mandatory, to initialize each new clone
|
|
|
|
of a repository with its own description.
|
2011-03-03 20:58:52 +00:00
|
|
|
|
|
|
|
* describe repository description
|
|
|
|
|
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
|
|
|
|
"."
|
|
|
|
|
2011-03-29 03:22:31 +00:00
|
|
|
* initremote name [param=value ...]
|
2011-03-28 06:12:05 +00:00
|
|
|
|
2011-04-09 19:57:45 +00:00
|
|
|
Sets up a special remote. The remote's
|
2011-03-29 18:55:59 +00:00
|
|
|
configuration is specified by the parameters. If a remote
|
2011-03-28 23:08:12 +00:00
|
|
|
with the specified name has already been configured, its configuration
|
|
|
|
is modified by any values specified. In either case, the remote will be
|
2011-03-29 18:55:59 +00:00
|
|
|
added to `.git/config`.
|
2011-03-28 17:47:29 +00:00
|
|
|
|
2011-03-28 23:08:12 +00:00
|
|
|
Example Amazon S3 remote:
|
2011-03-28 06:12:05 +00:00
|
|
|
|
2011-03-29 03:22:31 +00:00
|
|
|
initremote mys3 type=S3 encryption=none datacenter=EU
|
2011-03-28 06:12:05 +00:00
|
|
|
|
2011-09-16 02:22:43 +00:00
|
|
|
* trust [repository ...]
|
|
|
|
|
|
|
|
Records that a repository is trusted to not unexpectedly lose
|
|
|
|
content. Use with care.
|
|
|
|
|
|
|
|
To trust the current repository, use "."
|
|
|
|
|
|
|
|
* untrust [repository ...]
|
|
|
|
|
|
|
|
Records that a repository is not trusted and could lose content
|
|
|
|
at any time.
|
|
|
|
|
|
|
|
* semitrust [repository ...]
|
|
|
|
|
|
|
|
Returns a repository to the default semi trusted state.
|
|
|
|
|
2011-12-02 20:59:55 +00:00
|
|
|
* dead [repository ...]
|
|
|
|
|
|
|
|
Indicates that the repository has been irretrevably lost.
|
|
|
|
(To undo, use semitrust.)
|
|
|
|
|
2011-09-16 02:22:43 +00:00
|
|
|
# REPOSITORY MAINTENANCE COMMANDS
|
|
|
|
|
2010-11-15 22:04:19 +00:00
|
|
|
* fsck [path ...]
|
|
|
|
|
2010-12-30 20:52:24 +00:00
|
|
|
With no parameters, this command checks the whole annex for consistency,
|
2011-03-22 22:52:52 +00:00
|
|
|
and warns about or fixes any problems found.
|
2010-11-15 22:04:19 +00:00
|
|
|
|
|
|
|
With parameters, only the specified files are checked.
|
|
|
|
|
2012-01-19 19:24:05 +00:00
|
|
|
To check a remote to fsck, specify --from.
|
2012-01-20 17:23:11 +00:00
|
|
|
|
|
|
|
To avoid expensive checksum calculations (and expensive transfers when
|
|
|
|
fscking a remote), specify --fast
|
2012-01-19 19:24:05 +00:00
|
|
|
|
2010-11-15 22:04:19 +00:00
|
|
|
* unused
|
|
|
|
|
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
|
|
|
|
2011-09-28 22:11:53 +00:00
|
|
|
To only show unused temp and bad files, specify --fast.
|
2011-03-27 22:34:30 +00:00
|
|
|
|
2011-09-23 22:04:38 +00:00
|
|
|
To check for annexed data on a remote, specify --from.
|
2011-04-03 00:59:41 +00:00
|
|
|
|
2010-11-15 22:04:19 +00:00
|
|
|
* dropunused [number ...]
|
|
|
|
|
|
|
|
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
|
|
|
|
2011-04-03 00:59:41 +00:00
|
|
|
To drop the data from a remote, specify --from.
|
|
|
|
|
2011-09-16 02:22:43 +00:00
|
|
|
* merge
|
|
|
|
|
2011-12-23 16:48:59 +00:00
|
|
|
Automatically merges remote tracking branches */git-annex into
|
|
|
|
the git-annex branch. While git-annex mostly handles keeping the
|
|
|
|
git-annex branch merged automatically, if you find you are unable
|
|
|
|
to push the git-annex branch due non-fast-forward, this will fix it.
|
2011-09-16 02:22:43 +00:00
|
|
|
|
|
|
|
* fix [path ...]
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
* upgrade
|
|
|
|
|
|
|
|
Upgrades the repository to current layout.
|
|
|
|
|
|
|
|
# QUERY COMMANDS
|
|
|
|
|
|
|
|
* version
|
|
|
|
|
|
|
|
Shows the version of git-annex, as well as repository version information.
|
|
|
|
|
2010-11-15 22:04:19 +00:00
|
|
|
* find [path ...]
|
|
|
|
|
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.
|
|
|
|
This can be changed by specifying file matching options. To list all
|
|
|
|
annexed files, present or not, specify --include "*". To list all
|
2011-12-23 18:14:00 +00:00
|
|
|
annexed files whose content is not present, specify --not --in="."
|
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,
|
2011-12-22 22:31:44 +00:00
|
|
|
specify --print0. Or, a custom output formatting can be specified using
|
2011-12-23 00:18:33 +00:00
|
|
|
--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,
|
|
|
|
bytesize, humansize
|
2011-11-22 18:06:31 +00:00
|
|
|
|
2011-03-05 21:23:55 +00:00
|
|
|
* whereis [path ...]
|
|
|
|
|
|
|
|
Displays a list of repositories known to contain the content of the
|
|
|
|
specified file or files.
|
|
|
|
|
2012-01-06 19:40:04 +00:00
|
|
|
* log [path ...]
|
|
|
|
|
|
|
|
Displays the location log for the specified file or files,
|
|
|
|
showing each repository they were added to ("+") and removed from ("-").
|
|
|
|
|
2012-01-07 01:48:30 +00:00
|
|
|
To limit how far back to seach for location log changes, the options
|
|
|
|
--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
|
|
|
|
2012-01-07 22:13:12 +00:00
|
|
|
To generate output suitable for the gource visualisation program,
|
|
|
|
specify --gource.
|
|
|
|
|
2011-05-17 01:18:34 +00:00
|
|
|
* status
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
To only show the data that can be gathered quickly, use --fast.
|
2011-05-17 01:18:34 +00:00
|
|
|
|
2011-02-03 22:55:12 +00:00
|
|
|
* map
|
|
|
|
|
|
|
|
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
|
|
|
|
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
|
|
|
|
|
|
|
|
* migrate [path ...]
|
|
|
|
|
|
|
|
Changes the specified annexed files to use the default key-value backend
|
|
|
|
(or the one specified with --backend). Only files whose content
|
|
|
|
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.
|
|
|
|
|
2011-10-31 19:18:41 +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:
|
|
|
|
|
2011-10-31 19:18:41 +00:00
|
|
|
git annex reinject /tmp/foo.iso foo.iso
|
2011-10-31 16:33:41 +00:00
|
|
|
|
2010-10-21 21:59:32 +00:00
|
|
|
* unannex [path ...]
|
|
|
|
|
2011-02-02 01:26:19 +00:00
|
|
|
Use this to undo an accidental `git annex add` command. You can use
|
|
|
|
`git annex unannex` to move content out of the annex at any point,
|
|
|
|
even if you've already committed it.
|
|
|
|
|
|
|
|
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
|
|
|
|
2011-07-04 20:06:28 +00:00
|
|
|
In --fast mode, this command leaves content in the annex, simply making
|
|
|
|
a hard link to it.
|
|
|
|
|
2010-12-03 04:33:41 +00:00
|
|
|
* uninit
|
|
|
|
|
|
|
|
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
|
|
|
|
2010-10-27 18:33:44 +00:00
|
|
|
* pre-commit [path ...]
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
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 17:55:28 +00:00
|
|
|
|
2011-10-31 16:47:13 +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
|
|
|
|
2010-10-25 22:32:29 +00:00
|
|
|
* dropkey [key ...]
|
|
|
|
|
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.
|
|
|
|
|
2010-11-15 22:19:13 +00:00
|
|
|
Example:
|
|
|
|
|
2011-03-16 02:42:34 +00:00
|
|
|
git annex dropkey SHA1-s10-7da006579dd64330eb2456001fd01948430572f2
|
2010-11-15 22:19:13 +00:00
|
|
|
|
2010-10-19 19:59:40 +00:00
|
|
|
# OPTIONS
|
|
|
|
|
|
|
|
* --force
|
|
|
|
|
|
|
|
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
|
|
|
|
2011-03-22 21:41:06 +00:00
|
|
|
* --fast
|
|
|
|
|
|
|
|
Enables 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
|
|
|
|
2011-09-15 17:30:04 +00:00
|
|
|
* --auto
|
|
|
|
|
2011-09-15 19:15:47 +00:00
|
|
|
Enables automatic mode. Commands that get, drop, or move file contents
|
|
|
|
will only do so when needed to help satisfy the setting of annex.numcopies.
|
2011-09-15 17:30:04 +00:00
|
|
|
|
2010-10-25 22:32:29 +00:00
|
|
|
* --quiet
|
|
|
|
|
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.
|
|
|
|
|
2010-10-28 18:04:22 +00:00
|
|
|
* --verbose
|
|
|
|
|
2011-09-01 19:16:31 +00:00
|
|
|
Enable verbose display.
|
|
|
|
|
|
|
|
* --json
|
|
|
|
|
|
|
|
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
|
|
|
|
object.
|
2010-10-28 18:04:22 +00:00
|
|
|
|
2011-05-21 15:52:13 +00:00
|
|
|
* --debug
|
|
|
|
|
|
|
|
Show debug messages.
|
|
|
|
|
2010-10-23 00:35:39 +00:00
|
|
|
* --from=repository
|
|
|
|
|
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
|
|
|
|
2010-10-21 21:59:32 +00:00
|
|
|
* --to=repository
|
|
|
|
|
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
|
|
|
|
2011-06-01 20:49:17 +00:00
|
|
|
* --numcopies=n
|
|
|
|
|
|
|
|
Overrides the `annex.numcopies` setting, forcing git-annex to ensure the
|
|
|
|
specified number of copies exist.
|
|
|
|
|
2011-06-01 21:49:37 +00:00
|
|
|
* --trust=repository
|
|
|
|
* --semitrust=repository
|
|
|
|
* --untrust=repository
|
|
|
|
|
|
|
|
Overrides trust settings for a repository. May be specified more than once.
|
|
|
|
|
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
|
|
|
|
2010-11-15 22:04:19 +00:00
|
|
|
* --backend=name
|
|
|
|
|
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
|
|
|
|
2011-12-22 22:31:44 +00:00
|
|
|
* --format=value
|
|
|
|
|
|
|
|
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
|
|
|
|
2011-07-14 20:44:23 +00:00
|
|
|
* -c name=value
|
|
|
|
|
|
|
|
Used to override git configuration settings. May be specified multiple times.
|
|
|
|
|
2011-09-18 22:24:10 +00:00
|
|
|
# FILE MATCHING OPTIONS
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
* --exclude=glob
|
|
|
|
|
|
|
|
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:
|
|
|
|
|
|
|
|
--exclude='*.mp3' --exclude='subdir/*'
|
|
|
|
|
|
|
|
* --include=glob
|
|
|
|
|
|
|
|
Skips files not matching the glob pattern. (Same as --not --exclude.)
|
|
|
|
For example, to include only mp3 and ogg files:
|
|
|
|
|
|
|
|
--include='*.mp3' --or --include='*.ogg'
|
2011-09-18 22:24:10 +00:00
|
|
|
|
|
|
|
* --in=repository
|
|
|
|
|
|
|
|
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,
|
|
|
|
use "--in=."
|
2011-09-18 22:24:10 +00:00
|
|
|
|
2011-09-19 00:23:08 +00:00
|
|
|
* --copies=number
|
|
|
|
|
|
|
|
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
|
|
|
|
2011-11-28 21:37:15 +00:00
|
|
|
* --inbackend=name
|
|
|
|
|
|
|
|
Matches only files whose content is stored using the specified key-value
|
|
|
|
backend.
|
|
|
|
|
2011-09-18 22:24:10 +00:00
|
|
|
* --not
|
|
|
|
|
|
|
|
Inverts the next file matching option. For example, to only act on
|
|
|
|
mp3s, use: --not --exclude='*.mp3'
|
|
|
|
|
|
|
|
* --and
|
|
|
|
|
|
|
|
Requires that both the previous and the next file matching option matches.
|
|
|
|
The default.
|
|
|
|
|
|
|
|
* --or
|
|
|
|
|
|
|
|
Requires that either the previous, or the next file matching option matches.
|
|
|
|
|
|
|
|
* -(
|
|
|
|
|
|
|
|
Opens a group of file matching options.
|
|
|
|
|
|
|
|
* -)
|
|
|
|
|
|
|
|
Closes a group of file matching options.
|
|
|
|
|
2010-10-27 19:08:46 +00:00
|
|
|
# CONFIGURATION
|
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.numcopies`
|
|
|
|
|
|
|
|
Number of copies of files to keep across all repositories. (default: 1)
|
|
|
|
|
|
|
|
* `annex.backends`
|
|
|
|
|
|
|
|
Space-separated list of names of the key-value backends to use.
|
|
|
|
The first listed is used to store new files by default.
|
|
|
|
|
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,
|
|
|
|
"0.5 gb" or "100 KiloBytes"
|
|
|
|
|
|
|
|
The default reserve is 1 megabyte.
|
|
|
|
|
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.
|
|
|
|
|
2011-10-14 22:23:17 +00:00
|
|
|
* `annex.version`
|
|
|
|
|
|
|
|
Automatically maintained, and used to automate upgrades between versions.
|
|
|
|
|
2012-01-20 21:13:36 +00:00
|
|
|
* `annex.sshcaching`
|
|
|
|
|
|
|
|
By default, git-annex caches ssh connections. To disable this, set to `false`.
|
|
|
|
|
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.
|
|
|
|
This allows varying the cost based on eg, the current network. The
|
|
|
|
cost-command can be any shell command line.
|
|
|
|
|
2010-12-10 21:30:13 +00:00
|
|
|
* `remote.<name>.annex-ignore`
|
|
|
|
|
|
|
|
If set to `true`, prevents git-annex
|
2011-01-25 22:54:34 +00:00
|
|
|
from using this remote by default. (You can still request it be used
|
|
|
|
by the --from and --to options.)
|
|
|
|
|
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
|
|
|
|
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".
|
|
|
|
|
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
|
2010-12-02 21:45:28 +00:00
|
|
|
the bandwidth to 100Kbyte/s, set it to "-6 --bwlimit 100"
|
2010-12-10 21:30:13 +00:00
|
|
|
|
2012-01-02 18:20:20 +00:00
|
|
|
* `remote.<name>.annex-web-options`
|
|
|
|
|
|
|
|
Options to use when using wget or curl to download a file from the web.
|
|
|
|
(wget is always used in preference to curl if available).
|
|
|
|
For example, to force ipv4 only, set it to "-4"
|
|
|
|
|
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.
|
2011-10-29 01:24:24 +00:00
|
|
|
For example, to limit the bandwidth to 100Kbye/s, set it to "--bwlimit 100k"
|
2011-04-08 18:56:57 +00:00
|
|
|
(There is no corresponding option for bup join.)
|
|
|
|
|
2012-01-02 18:22:50 +00:00
|
|
|
* `annex.ssh-options`, `annex.rsync-options`, `annex.web-options, `annex.bup-split-options`
|
2011-04-08 18:56:57 +00:00
|
|
|
|
2012-01-02 18:22:50 +00:00
|
|
|
Default ssh, rsync, wget/curl, and bup options to use if a remote does not
|
|
|
|
have specific options.
|
2010-12-10 21:30:13 +00:00
|
|
|
|
2011-04-09 19:57:45 +00:00
|
|
|
* `remote.<name>.buprepo`
|
|
|
|
|
|
|
|
Used by bup special remotes, this configures
|
|
|
|
the location of the bup repository to use. Normally this is automaticaly
|
|
|
|
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
|
|
|
|
remote. Normally this is automaticaly set up by `git annex initremote`,
|
|
|
|
but you can change it if needed.
|
|
|
|
|
|
|
|
* `remote.<name>.s3`
|
|
|
|
|
|
|
|
Used to identify Amazon S3 special remotes.
|
|
|
|
Normally this is automaticaly set up by `git annex initremote`.
|
2011-03-28 06:12:05 +00:00
|
|
|
|
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,
|
|
|
|
but the SHA1 backend for ogg files:
|
|
|
|
|
2010-11-28 22:58:03 +00:00
|
|
|
* annex.backend=WORM
|
|
|
|
*.ogg annex.backend=SHA1
|
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
|
2010-11-28 22:55:49 +00:00
|
|
|
the `annex.numcopies` attribute in `.gitattributes` files.
|
2010-11-28 21:54:42 +00:00
|
|
|
For example, this makes two copies be needed for wav files:
|
2010-11-28 19:28:20 +00:00
|
|
|
|
2010-11-28 22:55:49 +00:00
|
|
|
*.wav annex.numcopies=2
|
2010-11-28 19:28:20 +00:00
|
|
|
|
2010-10-19 19:59:40 +00:00
|
|
|
# FILES
|
|
|
|
|
2010-11-28 21:54:42 +00:00
|
|
|
These files are used by git-annex, in your git repository:
|
2010-10-19 19:59:40 +00:00
|
|
|
|
2010-11-08 20:47:36 +00:00
|
|
|
`.git/annex/objects/` contains the annexed file contents that are currently
|
2010-10-19 19:59:40 +00:00
|
|
|
available. Annexed files in your git repository symlink to that content.
|
|
|
|
|
2010-10-27 18:40:50 +00:00
|
|
|
# SEE ALSO
|
|
|
|
|
|
|
|
Most of git-annex's documentation is available on its web site,
|
|
|
|
<http://git-annex.branchable.com/>
|
|
|
|
|
|
|
|
If git-annex is installed from a package, a copy of its documentation
|
|
|
|
should be included, in, for example, `/usr/share/doc/git-annex/`
|
|
|
|
|
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/>
|
|
|
|
|
2011-12-07 17:17:00 +00:00
|
|
|
Warning: Automatically converted into a man page by mdwn2man. Edit with care
|