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
|
2014-12-20 12:18:24 +00:00
|
|
|
get video/hackity_hack_and_kaxxt.mov (not available)
|
2010-10-19 19:59:40 +00:00
|
|
|
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
|
|
|
|
2015-03-23 21:35:39 +00:00
|
|
|
* `help`
|
|
|
|
|
|
|
|
Display built-in help.
|
|
|
|
|
|
|
|
For help on a specific command, use `git annex help command`
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `add [path ...]`
|
2010-10-19 19:59:40 +00:00
|
|
|
|
2020-05-12 13:07:45 +00:00
|
|
|
Adds files to the annex.
|
2015-03-23 19:36:10 +00:00
|
|
|
|
|
|
|
See [[git-annex-add]](1) for details.
|
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
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
Makes the content of annexed files available in this repository.
|
|
|
|
|
|
|
|
See [[git-annex-get]](1) for details.
|
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.
|
2015-03-23 19:36:10 +00:00
|
|
|
|
|
|
|
See [[git-annex-drop]](1) for details.
|
2010-10-19 19:59:40 +00:00
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
* `move [path ...] [--from=remote|--to=remote]`
|
2010-10-21 21:59:32 +00:00
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
Moves the content of files from or to another remote.
|
2010-11-27 21:02:53 +00:00
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
See [[git-annex-move]](1) for details.
|
2011-03-27 22:34:30 +00:00
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
* `copy [path ...] [--from=remote|--to=remote]`
|
2010-11-27 21:02:53 +00:00
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
Copies the content of files from or to another remote.
|
2013-12-02 19:41:20 +00:00
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
See [[git-annex-copy]](1) for details.
|
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
|
|
|
|
2023-02-28 20:34:31 +00:00
|
|
|
Show the working tree status. (deprecated)
|
2015-03-23 19:36:10 +00:00
|
|
|
|
|
|
|
See [[git-annex-status]](1) for details.
|
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
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
Unlock annexed files for modification.
|
|
|
|
|
|
|
|
See [[git-annex-unlock]](1) for details.
|
2011-03-03 20:58:52 +00:00
|
|
|
|
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.
|
2015-03-23 19:36:10 +00:00
|
|
|
|
|
|
|
See [[git-annex-lock]](1) for details.
|
2010-11-08 01:02:25 +00:00
|
|
|
|
git-annex pull and push
Split out two new commands, git-annex pull and git-annex push. Those plus a
git commit are equivilant to git-annex sync.
In a sense, git-annex sync conflates 3 things, and it would have been
better to have push and pull from the beginning and not sync. Although
note that git-annex sync --content is faster than a pull followed by a
push, because it only has to walk the tree once, look at preferred
content once, etc. So there is some value in git-annex sync in speed, as
well as user convenience.
And it would be hard to split out pull and push from sync, as far as the
implementaton goes. The implementation inside sync was easy, just adjust
SyncOptions so it does the right thing.
Note that the new commands default to syncing content, unless
annex.synccontent is explicitly set to false. I'd like sync to also do
that, but that's a hard transition to make. As a start to that
transition, I added a note to git-annex-sync.mdwn that it may start to
do so in a future version of git-annex. But a real transition would
necessarily involve displaying warnings when sync is used without
--content, and time.
Sponsored-by: Kevin Mueller on Patreon
2023-05-16 20:37:30 +00:00
|
|
|
* `pull [remote ...]`
|
|
|
|
|
|
|
|
Pull content from remotes.
|
|
|
|
|
|
|
|
See [[git-annex-pull]](1) for details.
|
|
|
|
|
|
|
|
* `push [remote ...]`
|
|
|
|
|
|
|
|
Push content to remotes.
|
|
|
|
|
|
|
|
See [[git-annex-push]](1) for details.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `sync [remote ...]`
|
2011-12-10 00:27:22 +00:00
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
Synchronize local repository with remotes.
|
|
|
|
|
|
|
|
See [[git-annex-sync]](1) for details.
|
2013-08-20 19:46:35 +00:00
|
|
|
|
git-annex assist
assist: New command, which is the same as git-annex sync but with
new files added and content transferred by default.
(Also this fixes another reversion in git-annex sync,
--commit --no-commit, and --message were not enabled, oops.)
See added comment for why git-annex assist does commit staged
changes elsewhere in the work tree, but only adds files under
the cwd.
Note that it does not support --no-commit, --no-push, --no-pull
like sync does. My thinking is, why should it? If you want that
level of control, use git commit, git annex push, git annex pull.
Sync only got those options because pull and push were not split
out.
Sponsored-by: k0ld on Patreon
2023-05-18 18:37:29 +00:00
|
|
|
* `assist [remote ...]`
|
|
|
|
|
|
|
|
Add files and sync changes with remotes.
|
|
|
|
|
|
|
|
See [[git-annex-assist]](1) for details.
|
|
|
|
|
added git-annex satisfy
This ended up having an interface like sync, rather than like get/copy/drop.
That let it be implemented in terms of sync, which took a lot less code.
Also, it lets it handle many of the edge cases that sync does, such as
getting files that are not visible in a --hide-missing branch, and sending
files to exporttree remotes.
As well as being easier to implement, `git-annex satisfy myremote` makes
sense as it satisfies the preferred content settings of the remote.
`git-annex satisfy somefile` does not form a sentence that makes sense. So
while -C can be a little bit annoying, it still makes sense to have this
syntax.
Note that, while I initially thought this would also satisfy numcopies, it
does not. Arguably it ought to. But, sync does not send files in order to
satisfy numcopies, it only sends files to satisfy preferred content. And
it's important that this transfer the same files as sync does, because
it will probably be used in a workflow where the user sometimes syncs and
sometimes satisfies, and does not expect satisfy to do things that sync
would not do.
(Also opened a new bug that also affects sync et all, not only this command.)
Sponsored-by: Nicholas Golder-Manning on Patreon
2023-06-29 19:34:53 +00:00
|
|
|
* `satisfy [remote ...]`
|
2023-06-29 18:15:01 +00:00
|
|
|
|
added git-annex satisfy
This ended up having an interface like sync, rather than like get/copy/drop.
That let it be implemented in terms of sync, which took a lot less code.
Also, it lets it handle many of the edge cases that sync does, such as
getting files that are not visible in a --hide-missing branch, and sending
files to exporttree remotes.
As well as being easier to implement, `git-annex satisfy myremote` makes
sense as it satisfies the preferred content settings of the remote.
`git-annex satisfy somefile` does not form a sentence that makes sense. So
while -C can be a little bit annoying, it still makes sense to have this
syntax.
Note that, while I initially thought this would also satisfy numcopies, it
does not. Arguably it ought to. But, sync does not send files in order to
satisfy numcopies, it only sends files to satisfy preferred content. And
it's important that this transfer the same files as sync does, because
it will probably be used in a workflow where the user sometimes syncs and
sometimes satisfies, and does not expect satisfy to do things that sync
would not do.
(Also opened a new bug that also affects sync et all, not only this command.)
Sponsored-by: Nicholas Golder-Manning on Patreon
2023-06-29 19:34:53 +00:00
|
|
|
Satisfy preferred content settings by transferring and dropping content.
|
2023-06-29 18:15:01 +00:00
|
|
|
|
|
|
|
See [[git-annex-satisfy]](1) for details.
|
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
* `mirror [path ...] [--to=remote|--from=remote]`
|
2013-08-20 19:46:35 +00:00
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
Mirror content of files to/from another repository.
|
|
|
|
|
|
|
|
See [[git-annex-mirror]](1) for details.
|
2014-01-01 21:39:33 +00:00
|
|
|
|
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.
|
2015-03-23 19:36:10 +00:00
|
|
|
|
|
|
|
See [[git-annex-addurl]](1) for details.
|
2015-03-05 18:46:08 +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.
|
2015-03-23 19:36:10 +00:00
|
|
|
|
|
|
|
See [[git-annex-rmurl]](1) for details.
|
2013-04-22 21:18:53 +00:00
|
|
|
|
2019-11-19 17:26:27 +00:00
|
|
|
* `import --from remote branch[:subdir] | [path ...]`
|
2012-05-31 23:47:18 +00:00
|
|
|
|
2019-11-19 17:26:27 +00:00
|
|
|
Add a tree of files to the repository.
|
2015-02-06 19:58:06 +00:00
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
See [[git-annex-import]](1) for details.
|
2013-08-11 16:56:26 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `importfeed [url ...]`
|
2013-07-28 19:27:36 +00:00
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
Imports the contents of podcast feeds into the annex.
|
|
|
|
|
|
|
|
See [[git-annex-importfeed]](1) for details.
|
2013-07-28 19:27:36 +00:00
|
|
|
|
2017-08-29 17:25:48 +00:00
|
|
|
* `export treeish --to remote`
|
|
|
|
|
|
|
|
Export content to a remote.
|
|
|
|
|
|
|
|
See [[git-annex-export]](1) for details.
|
|
|
|
|
2014-11-13 20:41:21 +00:00
|
|
|
* `undo [filename|directory] ...`
|
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
Undo last change to a file or directory.
|
|
|
|
|
|
|
|
See [[git-annex-undo]](1) for details.
|
2014-11-13 20:41:21 +00:00
|
|
|
|
2017-03-30 23:32:58 +00:00
|
|
|
* `multicast`
|
|
|
|
|
|
|
|
Multicast file distribution.
|
|
|
|
|
|
|
|
See [[git-annex-multicast]](1) for details.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `watch`
|
2012-06-07 03:27:20 +00:00
|
|
|
|
git-annex assist
assist: New command, which is the same as git-annex sync but with
new files added and content transferred by default.
(Also this fixes another reversion in git-annex sync,
--commit --no-commit, and --message were not enabled, oops.)
See added comment for why git-annex assist does commit staged
changes elsewhere in the work tree, but only adds files under
the cwd.
Note that it does not support --no-commit, --no-push, --no-pull
like sync does. My thinking is, why should it? If you want that
level of control, use git commit, git annex push, git annex pull.
Sync only got those options because pull and push were not split
out.
Sponsored-by: k0ld on Patreon
2023-05-18 18:37:29 +00:00
|
|
|
Daemon to watch for changes and autocommit.
|
2015-03-23 19:36:10 +00:00
|
|
|
|
|
|
|
See [[git-annex-watch]](1) for details.
|
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
|
|
|
|
git-annex assist
assist: New command, which is the same as git-annex sync but with
new files added and content transferred by default.
(Also this fixes another reversion in git-annex sync,
--commit --no-commit, and --message were not enabled, oops.)
See added comment for why git-annex assist does commit staged
changes elsewhere in the work tree, but only adds files under
the cwd.
Note that it does not support --no-commit, --no-push, --no-pull
like sync does. My thinking is, why should it? If you want that
level of control, use git commit, git annex push, git annex pull.
Sync only got those options because pull and push were not split
out.
Sponsored-by: k0ld on Patreon
2023-05-18 18:37:29 +00:00
|
|
|
Daemon to automatically sync changes.
|
2012-07-26 01:26:13 +00:00
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
See [[git-annex-assistant]](1) for details.
|
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,
|
2014-03-12 19:40:20 +00:00
|
|
|
and control of the git-annex assistant. If the assistant is not
|
|
|
|
already running, it will be started.
|
2012-06-22 17:04:03 +00:00
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
See [[git-annex-webapp]](1) for details.
|
2013-04-08 19:04:35 +00:00
|
|
|
|
2019-09-30 18:40:46 +00:00
|
|
|
* `remotedaemon`
|
|
|
|
|
|
|
|
Persistant communication with remotes.
|
|
|
|
|
|
|
|
See [[git-annex-remotedaemon]](1) for details.
|
|
|
|
|
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.
|
2015-03-23 22:20:42 +00:00
|
|
|
|
|
|
|
See [[git-annex-init]](1) for details.
|
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.
|
2015-03-23 22:20:42 +00:00
|
|
|
|
|
|
|
See [[git-annex-describe]](1) for details.
|
2011-03-03 20:58:52 +00:00
|
|
|
|
2015-03-23 22:20:42 +00:00
|
|
|
* `initremote name type=value [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
|
|
|
|
2015-03-23 22:20:42 +00:00
|
|
|
See [[git-annex-initremote]](1) for details.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `enableremote name [param=value ...]`
|
2013-04-26 22:22:44 +00:00
|
|
|
|
2015-03-23 22:20:42 +00:00
|
|
|
Enables use of an existing special remote in the current repository.
|
|
|
|
|
|
|
|
See [[git-annex-enableremote]](1) for details.
|
2013-09-01 18:12:00 +00:00
|
|
|
|
2023-04-18 19:30:49 +00:00
|
|
|
* `configremote name [param=value ...]`
|
|
|
|
|
|
|
|
Changes configuration of an existing special remote.
|
|
|
|
|
|
|
|
See [[git-annex-configremote]](1) for details.
|
|
|
|
|
|
|
|
|
2019-04-15 17:05:44 +00:00
|
|
|
* `renameremote`
|
|
|
|
|
|
|
|
Renames a special remote.
|
|
|
|
|
|
|
|
See [[git-annex-renameremote]](1) for details.
|
|
|
|
|
2016-11-20 18:39:26 +00:00
|
|
|
* `enable-tor`
|
|
|
|
|
|
|
|
Sets up tor hidden service.
|
|
|
|
|
|
|
|
See [[git-annex-enable-tor]](1) for details.
|
|
|
|
|
2014-01-20 20:47:56 +00:00
|
|
|
* `numcopies [N]`
|
|
|
|
|
2015-03-23 22:20:42 +00:00
|
|
|
Configure desired number of copies.
|
|
|
|
|
|
|
|
See [[git-annex-numcopies]](1) for details.
|
2014-01-20 20:47:56 +00:00
|
|
|
|
2021-01-06 18:11:08 +00:00
|
|
|
* `mincopies [N]`
|
|
|
|
|
|
|
|
Configure minimum number of copies.
|
|
|
|
|
|
|
|
See [[git-annex-mincopies]](1) for details.
|
|
|
|
|
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.
|
2015-03-23 22:20:42 +00:00
|
|
|
|
|
|
|
See [[git-annex-trust]](1) for details.
|
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.
|
2015-03-23 22:20:42 +00:00
|
|
|
|
|
|
|
See [[git-annex-untrust]](1) for details.
|
2011-09-16 02:22:43 +00:00
|
|
|
|
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.
|
2015-03-23 22:20:42 +00:00
|
|
|
|
|
|
|
See [[git-annex-semitrust]](1) for details.
|
2011-09-16 02:22:43 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `group repository groupname`
|
2012-10-01 19:12:04 +00:00
|
|
|
|
2015-03-23 22:20:42 +00:00
|
|
|
Add a repository to a group.
|
|
|
|
|
|
|
|
See [[git-annex-group]](1) for details.
|
2014-05-16 18:43:40 +00:00
|
|
|
|
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.
|
2015-03-23 22:20:42 +00:00
|
|
|
|
|
|
|
See [[git-annex-ungroup]](1) for details.
|
2012-10-01 19:12:04 +00:00
|
|
|
|
2013-10-28 18:08:38 +00:00
|
|
|
* `wanted repository [expression]`
|
2015-03-23 22:20:42 +00:00
|
|
|
|
|
|
|
Get or set preferred content expression.
|
2013-05-25 16:44:58 +00:00
|
|
|
|
2015-03-23 22:20:42 +00:00
|
|
|
See [[git-annex-wanted]](1) for details.
|
2013-05-25 16:44:58 +00:00
|
|
|
|
2015-02-06 19:12:42 +00:00
|
|
|
* `groupwanted groupname [expression]`
|
|
|
|
|
2015-04-18 20:04:25 +00:00
|
|
|
Get or set groupwanted expression.
|
|
|
|
|
2015-03-23 22:20:42 +00:00
|
|
|
See [[git-annex-groupwanted]](1) for details.
|
2015-02-06 19:12:42 +00:00
|
|
|
|
2015-04-18 20:04:25 +00:00
|
|
|
* `required repository [expression]`
|
|
|
|
|
|
|
|
Get or set required content expression.
|
|
|
|
|
|
|
|
See [[git-annex-required]](1) for details.
|
|
|
|
|
2013-10-13 19:40:38 +00:00
|
|
|
* `schedule repository [expression]`
|
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
Get or set scheduled jobs.
|
|
|
|
|
|
|
|
See [[git-annex-schedule]](1) for details.
|
2013-10-13 19:40:38 +00:00
|
|
|
|
2017-01-30 20:41:29 +00:00
|
|
|
* `config`
|
|
|
|
|
|
|
|
Get and set other configuration stored in git-annex branch.
|
|
|
|
|
|
|
|
See [[git-annex-config]](1) for details.
|
|
|
|
|
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
|
2014-03-15 20:17:01 +00:00
|
|
|
settings, as well as a few others, and when it exits, stores any changes
|
|
|
|
made back to the git-annex branch.
|
2015-03-23 22:20:42 +00:00
|
|
|
|
|
|
|
See [[git-annex-vicfg]](1) for details.
|
2012-10-03 21:04:52 +00:00
|
|
|
|
2019-08-26 18:52:55 +00:00
|
|
|
* `adjust`
|
|
|
|
|
|
|
|
Switches a repository to use an adjusted branch, which can automatically
|
|
|
|
unlock all files, etc.
|
|
|
|
|
|
|
|
See [[git-annex-adjust]](1) for details.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `direct`
|
2012-12-13 19:44:56 +00:00
|
|
|
|
2019-08-26 18:52:55 +00:00
|
|
|
Switches a repository to use direct mode. (deprecated)
|
2015-03-23 22:20:42 +00:00
|
|
|
|
|
|
|
See [[git-annex-direct]](1) for details.
|
2013-01-06 21:26:22 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `indirect`
|
2012-12-13 19:44:56 +00:00
|
|
|
|
2019-08-26 18:52:55 +00:00
|
|
|
Switches a repository to use indirect mode. (deprecated)
|
2015-03-23 22:20:42 +00:00
|
|
|
|
|
|
|
See [[git-annex-indirect]](1) for details.
|
2012-12-13 19:44:56 +00:00
|
|
|
|
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
|
|
|
|
2015-03-24 19:23:59 +00:00
|
|
|
Checks the annex consistency, and warns about or fixes any problems found.
|
|
|
|
This is a good complement to `git fsck`.
|
2010-11-15 22:04:19 +00:00
|
|
|
|
2015-03-24 19:23:59 +00:00
|
|
|
See [[git-annex-fsck]](1) for details.
|
2013-07-11 12:11:46 +00:00
|
|
|
|
2015-04-05 16:50:02 +00:00
|
|
|
* `expire [repository:]time ...`
|
|
|
|
|
|
|
|
Expires repositories that have not recently performed an activity
|
|
|
|
(such as a fsck).
|
|
|
|
|
2015-05-29 16:12:11 +00:00
|
|
|
See [[git-annex-expire]](1) for details.
|
|
|
|
|
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.
|
2015-03-24 19:23:59 +00:00
|
|
|
|
|
|
|
See [[git-annex-unused]](1) for details.
|
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`
|
2015-03-24 19:23:59 +00:00
|
|
|
|
|
|
|
See [[git-annex-dropunused]](1) for details.
|
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,
|
2015-03-24 19:23:59 +00:00
|
|
|
as listed by the last `git annex unused`.
|
|
|
|
|
|
|
|
See [[git-annex-addunused]](1) for details.
|
2012-05-02 18:59:05 +00:00
|
|
|
|
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.
|
2015-03-24 19:23:59 +00:00
|
|
|
|
|
|
|
See [[git-annex-fix]](1) for details.
|
2011-09-16 02:22:43 +00:00
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
* `merge`
|
|
|
|
|
|
|
|
Automatically merge changes from remotes.
|
|
|
|
|
|
|
|
See [[git-annex-merge]](1) for details.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `upgrade`
|
2011-09-16 02:22:43 +00:00
|
|
|
|
2019-09-01 17:29:55 +00:00
|
|
|
Upgrades the repository.
|
2015-03-24 19:23:59 +00:00
|
|
|
|
|
|
|
See [[git-annex-upgrade]](1) for details.
|
2011-09-16 02:22:43 +00:00
|
|
|
|
2015-06-09 18:52:05 +00:00
|
|
|
* `dead [repository ...] [--key key]`
|
|
|
|
|
|
|
|
Indicates that a repository or a single key has been irretrievably lost.
|
|
|
|
|
|
|
|
See [[git-annex-dead]](1) for details.
|
|
|
|
|
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
|
2015-03-24 19:23:59 +00:00
|
|
|
data about past locations of files.
|
|
|
|
|
|
|
|
See [[git-annex-forget]](1) for details.
|
2013-08-28 19:57:42 +00:00
|
|
|
|
2021-05-13 20:17:45 +00:00
|
|
|
* `filter-branch`
|
|
|
|
|
|
|
|
Produces a filtered version of the git-annex branch.
|
|
|
|
|
|
|
|
See [[git-annex-filter-branch]](1) for details.
|
|
|
|
|
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.
|
2015-03-24 19:23:59 +00:00
|
|
|
|
|
|
|
See [[git-annex-repair]](1) for details.
|
2013-10-23 16:21:59 +00:00
|
|
|
|
2016-11-29 21:31:10 +00:00
|
|
|
* `p2p`
|
|
|
|
|
|
|
|
Configure peer-2-Peer links between repositories.
|
|
|
|
|
|
|
|
See [[git-annex-p2p]](1) for details.
|
2016-11-20 18:39:26 +00:00
|
|
|
|
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
|
|
|
|
2015-03-24 19:23:59 +00:00
|
|
|
See [[git-annex-find]](1) for details.
|
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
|
|
|
|
2015-02-25 18:31:17 +00:00
|
|
|
Displays information about where the contents of files are located.
|
2015-03-24 19:23:59 +00:00
|
|
|
|
|
|
|
See [[git-annex-whereis]](1) for details.
|
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
|
2015-03-24 19:23:59 +00:00
|
|
|
files. This is similar to whereis but a more compact display.
|
|
|
|
|
|
|
|
See [[git-annex-list]](1) for details.
|
2013-09-12 16:21:21 +00:00
|
|
|
|
2021-07-14 18:25:52 +00:00
|
|
|
* `whereused`
|
|
|
|
|
2021-07-14 21:08:38 +00:00
|
|
|
Finds what files use or used a key.
|
2021-07-14 18:25:52 +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 ("-").
|
|
|
|
|
2015-03-24 19:23:59 +00:00
|
|
|
See [[git-annex-log]](1) for details.
|
2012-01-07 22:13:12 +00:00
|
|
|
|
2023-08-22 18:51:06 +00:00
|
|
|
* `oldkeys [path ...]`
|
|
|
|
|
|
|
|
List keys used for old versions of files.
|
2023-09-11 17:15:37 +00:00
|
|
|
|
|
|
|
See [[git-annex-oldkeys]](1) for details.
|
2023-08-22 18:51:06 +00:00
|
|
|
|
2015-01-13 22:11:03 +00:00
|
|
|
* `info [directory|file|remote|uuid ...]`
|
2011-05-17 01:18:34 +00:00
|
|
|
|
2014-10-21 17:24:15 +00:00
|
|
|
Displays statistics and other information for the specified item,
|
2015-01-13 22:11:03 +00:00
|
|
|
which can be a directory, or a file, or a remote, or the uuid of a
|
|
|
|
repository.
|
|
|
|
|
2014-10-21 18:36:09 +00:00
|
|
|
When no item is specified, displays statistics and information
|
2014-10-21 17:44:17 +00:00
|
|
|
for the repository as a whole.
|
2015-03-24 19:23:59 +00:00
|
|
|
|
|
|
|
See [[git-annex-info]](1) for details.
|
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.
|
2015-03-24 19:23:59 +00:00
|
|
|
|
|
|
|
See [[git-annex-version]](1) for details.
|
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
|
|
|
|
2015-03-24 19:23:59 +00:00
|
|
|
Generate map of repositories.
|
2011-02-03 22:55:12 +00:00
|
|
|
|
2015-03-24 19:23:59 +00:00
|
|
|
See [[git-annex-map]](1) for details.
|
2011-02-03 22:55:12 +00:00
|
|
|
|
2017-12-28 15:46:39 +00:00
|
|
|
* `inprogress`
|
|
|
|
|
|
|
|
Access files while they're being downloaded.
|
|
|
|
|
|
|
|
See [[git-annex-inprogress]](1) for details.
|
|
|
|
|
2023-01-17 18:42:29 +00:00
|
|
|
* `findkeys`
|
|
|
|
|
|
|
|
Similar to `git-annex find`, but operating on keys.
|
|
|
|
|
|
|
|
See [[git-annex-findkeys]](1) for details.
|
|
|
|
|
2014-02-19 18:55:34 +00:00
|
|
|
# METADATA COMMANDS
|
2011-09-16 02:22:43 +00:00
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
* `metadata [path ...]`
|
2014-02-13 01:12:22 +00:00
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
The content of an annexed file can have any number of metadata fields
|
2014-03-26 20:55:29 +00:00
|
|
|
attached to it to describe it. Each metadata field can in turn
|
2014-08-19 05:22:24 +00:00
|
|
|
have any number of values.
|
|
|
|
|
2014-03-15 21:29:40 +00:00
|
|
|
This command can be used to set metadata, or show the currently set
|
|
|
|
metadata.
|
2014-08-19 05:22:24 +00:00
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
See [[git-annex-metadata]](1) for details.
|
2014-02-13 01:12:22 +00:00
|
|
|
|
2023-02-07 20:28:46 +00:00
|
|
|
* `view [tag ...] [field=value ...] [field=glob ...] [?tag ...] [field?=glob] [!tag ...] [field!=value ...]`
|
2014-02-19 18:55:34 +00:00
|
|
|
|
|
|
|
Uses metadata to build a view branch of the files in the current branch,
|
|
|
|
and checks out the view branch. Only files in the current branch whose
|
|
|
|
metadata matches all the specified field values and tags will be
|
|
|
|
shown in the view.
|
2014-08-19 05:22:24 +00:00
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
See [[git-annex-view]](1) for details.
|
2014-02-19 18:55:34 +00:00
|
|
|
|
|
|
|
* `vpop [N]`
|
|
|
|
|
|
|
|
Switches from the currently active view back to the previous view.
|
|
|
|
Or, from the first view back to original branch.
|
2015-03-25 16:09:49 +00:00
|
|
|
|
|
|
|
See [[git-annex-vpop]](1) for details.
|
2014-02-19 18:55:34 +00:00
|
|
|
|
2014-03-02 18:53:19 +00:00
|
|
|
* `vfilter [tag ...] [field=value ...] [!tag ...] [field!=value ...]`
|
add tip about metadata driven views (and more flexible view filtering)
While writing this documentation, I realized that there needed to be a way
to stay in a view like tag=* while adding a filter like tag=work that
applies to the same field.
So, there are really two ways a view can be refined. It can have a new
"field=explicitvalue" filter added to it, which does not change the
"shape" of the view, but narrows the files it shows.
Or, it can have a new view added, which adds another level of
subdirectories.
So, added a vfilter command, which takes explicit values to add to the
filter, and rejects changes that would change the shape of the view.
And, made vadd only accept changes that change the shape of the view.
And, changed the View data type slightly; now components that can match
multiple metadata values can be visible, or not visible.
This commit was sponsored by Stelian Iancu.
2014-02-19 19:10:18 +00:00
|
|
|
|
|
|
|
Filters the current view to only the files that have the
|
2014-03-02 18:53:19 +00:00
|
|
|
specified field values and tags.
|
2015-03-25 16:09:49 +00:00
|
|
|
|
|
|
|
See [[git-annex-vfilter]](1) for details.
|
add tip about metadata driven views (and more flexible view filtering)
While writing this documentation, I realized that there needed to be a way
to stay in a view like tag=* while adding a filter like tag=work that
applies to the same field.
So, there are really two ways a view can be refined. It can have a new
"field=explicitvalue" filter added to it, which does not change the
"shape" of the view, but narrows the files it shows.
Or, it can have a new view added, which adds another level of
subdirectories.
So, added a vfilter command, which takes explicit values to add to the
filter, and rejects changes that would change the shape of the view.
And, made vadd only accept changes that change the shape of the view.
And, changed the View data type slightly; now components that can match
multiple metadata values can be visible, or not visible.
This commit was sponsored by Stelian Iancu.
2014-02-19 19:10:18 +00:00
|
|
|
|
2014-03-02 19:46:58 +00:00
|
|
|
* `vadd [field=glob ...] [field=value ...] [tag ...]`
|
2014-02-19 18:55:34 +00:00
|
|
|
|
add tip about metadata driven views (and more flexible view filtering)
While writing this documentation, I realized that there needed to be a way
to stay in a view like tag=* while adding a filter like tag=work that
applies to the same field.
So, there are really two ways a view can be refined. It can have a new
"field=explicitvalue" filter added to it, which does not change the
"shape" of the view, but narrows the files it shows.
Or, it can have a new view added, which adds another level of
subdirectories.
So, added a vfilter command, which takes explicit values to add to the
filter, and rejects changes that would change the shape of the view.
And, made vadd only accept changes that change the shape of the view.
And, changed the View data type slightly; now components that can match
multiple metadata values can be visible, or not visible.
This commit was sponsored by Stelian Iancu.
2014-02-19 19:10:18 +00:00
|
|
|
Changes the current view, adding an additional level of directories
|
|
|
|
to categorize the files.
|
2015-03-25 16:09:49 +00:00
|
|
|
|
|
|
|
See [[git-annex-vfilter]](1) for details.
|
2014-02-19 18:55:34 +00:00
|
|
|
|
|
|
|
* `vcycle`
|
|
|
|
|
|
|
|
When a view involves nested subdirectories, this cycles the order.
|
2015-03-25 16:09:49 +00:00
|
|
|
|
|
|
|
See [[git-annex-vcycle]](1) for details.
|
2014-02-19 18:55:34 +00:00
|
|
|
|
|
|
|
# UTILITY COMMANDS
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `migrate [path ...]`
|
2011-09-16 02:22:43 +00:00
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
Changes the specified annexed files to use a different key-value backend.
|
|
|
|
|
|
|
|
See [[git-annex-migrate]](1) for details.
|
2011-09-16 02:22:43 +00:00
|
|
|
|
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
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
See [[git-annex-reinject]](1) for details.
|
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.
|
2015-03-25 16:09:49 +00:00
|
|
|
|
|
|
|
See [[git-annex-unannex]](1) for details.
|
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
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
De-initialize git-annex and clean out repository.
|
|
|
|
|
2015-05-29 16:12:11 +00:00
|
|
|
See [[git-annex-uninit]](1) for details.
|
2010-12-03 04:33:41 +00:00
|
|
|
|
2014-04-16 00:13:35 +00:00
|
|
|
* `reinit uuid|description`
|
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
Initialize repository, reusing old UUID.
|
|
|
|
|
|
|
|
See [[git-annex-reinit]](1) for details.
|
2014-04-16 00:13:35 +00:00
|
|
|
|
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.
|
2015-03-25 16:09:49 +00:00
|
|
|
|
|
|
|
See [[git-annex-pre-commit]](1) for details.
|
2010-10-27 18:33:44 +00:00
|
|
|
|
2017-02-17 18:04:43 +00:00
|
|
|
* `post-receive`
|
|
|
|
|
|
|
|
This is meant to be called from git's post-receive hook. `git annex init`
|
|
|
|
automatically creates a post-receive hook using this.
|
|
|
|
|
|
|
|
See [[git-annex-post-receive]](1) for details.
|
|
|
|
|
2013-12-15 18:02:23 +00:00
|
|
|
* `lookupkey [file ...]`
|
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
Looks up key used for file.
|
2013-12-15 18:46:29 +00:00
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
See [[git-annex-lookupkey]](1) for details.
|
2013-12-15 18:46:29 +00:00
|
|
|
|
2016-04-20 17:49:42 +00:00
|
|
|
* `calckey [file ...]`
|
|
|
|
|
|
|
|
Calculates the key that would be used to refer to a file.
|
|
|
|
|
|
|
|
See [[git-annex-calckey]](1) for details.
|
|
|
|
|
2015-04-09 19:34:47 +00:00
|
|
|
* `contentlocation [key ..]`
|
|
|
|
|
|
|
|
Looks up location of annexed content for a key.
|
|
|
|
|
|
|
|
See [[git-annex-contentlocation]](1) for details.
|
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
* `examinekey [key ...]`
|
2014-01-18 06:30:01 +00:00
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
Print information that can be determined purely by looking at the key.
|
|
|
|
|
|
|
|
See [[git-annex-examinekey]](1) for details.
|
2013-12-15 18:46:29 +00:00
|
|
|
|
2016-01-25 20:16:18 +00:00
|
|
|
* `matchexpression`
|
|
|
|
|
|
|
|
Checks if a preferred content expression matches provided data.
|
|
|
|
|
|
|
|
See [[git-annex-matchexpression]](1) for details.
|
|
|
|
|
2015-03-15 18:07:43 +00:00
|
|
|
* `fromkey [key file]`
|
2010-10-21 20:30:16 +00:00
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
Manually set up a file in the git repository to link to a specified key.
|
|
|
|
|
|
|
|
See [[git-annex-fromkey]](1) for details.
|
2015-03-15 18:07:43 +00:00
|
|
|
|
2015-03-15 18:37:33 +00:00
|
|
|
* `registerurl [key url]`
|
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
Registers an url for a key.
|
|
|
|
|
|
|
|
See [[git-annex-registerurl]](1) for details.
|
2021-03-01 18:28:24 +00:00
|
|
|
|
|
|
|
* `unregisterurl [key url]`
|
|
|
|
|
|
|
|
Unregisters an url for a key.
|
|
|
|
|
|
|
|
See [[git-annex-unregisterurl]](1) for details.
|
2015-03-15 18:37:33 +00:00
|
|
|
|
2015-07-02 21:44:25 +00:00
|
|
|
* `setkey key file`
|
|
|
|
|
|
|
|
Moves a file into the annex as the content of a key.
|
|
|
|
|
|
|
|
See [[git-annex-setkey]](1) for details.
|
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `dropkey [key ...]`
|
2010-10-25 22:32:29 +00:00
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
Drops annexed content for specified keys.
|
|
|
|
|
|
|
|
See [[git-annex-dropkey]](1) for details.
|
2010-10-25 22:32:29 +00:00
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
* `transferkey key [--from=remote|--to=remote]`
|
2013-12-15 17:48:26 +00:00
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
Transfers a key from or to a remote.
|
|
|
|
|
|
|
|
See [[git-annex-transferkey]](1) for details.
|
2012-08-24 21:23:58 +00:00
|
|
|
|
2020-12-09 17:21:20 +00:00
|
|
|
* `transferrer`
|
2020-12-09 16:32:29 +00:00
|
|
|
|
|
|
|
Used internally by git-annex to transfer content.
|
|
|
|
|
2020-12-09 17:21:20 +00:00
|
|
|
See [[git-annex-transferrer]](1) for details.
|
2020-12-09 16:32:29 +00:00
|
|
|
|
2013-12-19 20:51:57 +00:00
|
|
|
* `transferkeys`
|
2015-03-25 16:09:49 +00:00
|
|
|
|
2020-12-09 16:32:29 +00:00
|
|
|
Used internally by old versions of the assistant.
|
2013-12-19 20:51:57 +00:00
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
See [[git-annex-transferkey]](1) for details.
|
2013-12-19 20:51:57 +00:00
|
|
|
|
2014-12-29 19:16:40 +00:00
|
|
|
* `setpresentkey key uuid [1|0]`
|
|
|
|
|
|
|
|
This plumbing-level command changes git-annex's records about whether
|
2015-03-20 15:22:27 +00:00
|
|
|
the specified key's content is present in a remote with the specified uuid.
|
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
See [[git-annex-setpresentkey]](1) for details.
|
|
|
|
|
2015-03-20 15:22:27 +00:00
|
|
|
* `readpresentkey key uuid`
|
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
Read records of where key is present.
|
2015-03-20 15:22:27 +00:00
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
See [[git-annex-readpresentkey]](1) for details.
|
2014-12-29 19:16:40 +00:00
|
|
|
|
2015-03-20 15:44:46 +00:00
|
|
|
* `checkpresentkey key remote`
|
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
Check if key is present in remote.
|
|
|
|
|
|
|
|
See [[git-annex-checkpresentkey]](1) for details.
|
2015-03-20 15:44:46 +00:00
|
|
|
|
2013-09-11 01:12:30 +00:00
|
|
|
* `rekey [file key ...]`
|
2013-07-11 12:11:47 +00:00
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
Change keys used for files.
|
|
|
|
|
|
|
|
See [[git-annex-rekey]](1) for details.
|
2012-02-16 20:36:35 +00:00
|
|
|
|
2014-07-11 20:45:18 +00:00
|
|
|
* `resolvemerge`
|
|
|
|
|
|
|
|
Resolves a conflicted merge, by adding both conflicting versions of the
|
|
|
|
file to the tree, using variants of their filename. This is done
|
git-annex pull and push
Split out two new commands, git-annex pull and git-annex push. Those plus a
git commit are equivilant to git-annex sync.
In a sense, git-annex sync conflates 3 things, and it would have been
better to have push and pull from the beginning and not sync. Although
note that git-annex sync --content is faster than a pull followed by a
push, because it only has to walk the tree once, look at preferred
content once, etc. So there is some value in git-annex sync in speed, as
well as user convenience.
And it would be hard to split out pull and push from sync, as far as the
implementaton goes. The implementation inside sync was easy, just adjust
SyncOptions so it does the right thing.
Note that the new commands default to syncing content, unless
annex.synccontent is explicitly set to false. I'd like sync to also do
that, but that's a hard transition to make. As a start to that
transition, I added a note to git-annex-sync.mdwn that it may start to
do so in a future version of git-annex. But a real transition would
necessarily involve displaying warnings when sync is used without
--content, and time.
Sponsored-by: Kevin Mueller on Patreon
2023-05-16 20:37:30 +00:00
|
|
|
automatically when using `git annex sync` or `git-annex pull`
|
|
|
|
or `git annex merge`.
|
2014-07-11 20:45:18 +00:00
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
See [[git-annex-resolvemerge]](1) for details.
|
2014-07-11 20:45:18 +00:00
|
|
|
|
2014-11-24 20:14:01 +00:00
|
|
|
* `diffdriver`
|
|
|
|
|
2023-06-28 19:26:46 +00:00
|
|
|
This can be used to make `git diff` diff the content of annexed files.
|
2014-11-24 20:14:01 +00:00
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
See [[git-annex-diffdriver]](1) for details.
|
2014-11-24 20:14:01 +00:00
|
|
|
|
2015-12-04 19:30:06 +00:00
|
|
|
* `smudge`
|
2015-12-04 17:02:56 +00:00
|
|
|
|
2015-12-04 19:30:06 +00:00
|
|
|
This command lets git-annex be used as a git filter driver, allowing
|
2022-09-23 20:29:28 +00:00
|
|
|
annexed files in the git repository to be unlocked regular files instead
|
|
|
|
of symlinks.
|
2015-12-04 17:02:56 +00:00
|
|
|
|
2015-12-04 19:30:06 +00:00
|
|
|
See [[git-annex-smudge]](1) for details.
|
2015-12-04 17:02:56 +00:00
|
|
|
|
2021-11-04 19:02:36 +00:00
|
|
|
* `filter-process`
|
|
|
|
|
|
|
|
An alternative implementation of a git filter driver, that is faster
|
|
|
|
in some situations and slower in others than `git-annex smudge`.
|
|
|
|
|
|
|
|
See [[git-annex-filter-process]](1) for details.
|
|
|
|
|
2022-09-23 20:29:28 +00:00
|
|
|
* `restage`
|
|
|
|
|
|
|
|
Restages unlocked files in the git index.
|
|
|
|
|
|
|
|
See [[git-annex-restage]](1) for details.
|
|
|
|
|
2019-08-26 18:52:55 +00:00
|
|
|
* `findref [ref]`
|
|
|
|
|
|
|
|
Lists files in a git ref. (deprecated)
|
|
|
|
|
|
|
|
See [[git-annex-findref]](1) for details.
|
|
|
|
|
|
|
|
* `proxy -- git cmd [options]`
|
|
|
|
|
|
|
|
Bypass direct mode guard. (deprecated)
|
|
|
|
|
|
|
|
See [[git-annex-proxy]](1) for details.
|
|
|
|
|
2014-08-01 16:49:26 +00:00
|
|
|
# TESTING COMMANDS
|
|
|
|
|
|
|
|
* `test`
|
|
|
|
|
|
|
|
This runs git-annex's built-in test suite.
|
2015-03-25 16:09:49 +00:00
|
|
|
|
|
|
|
See [[git-annex-test]](1) for details.
|
2014-08-01 16:49:26 +00:00
|
|
|
|
2014-08-01 19:09:49 +00:00
|
|
|
* `testremote remote`
|
|
|
|
|
|
|
|
This tests a remote by generating some random objects and sending them to
|
|
|
|
the remote, then redownloading them, removing them from the remote, etc.
|
|
|
|
|
|
|
|
It's safe to run in an existing repository (the repository contents are
|
|
|
|
not altered), although it may perform expensive data transfers.
|
2015-03-25 16:09:49 +00:00
|
|
|
|
|
|
|
See [[git-annex-testremote]](1) for details.
|
2014-08-01 21:52:40 +00:00
|
|
|
|
2014-08-01 16:49:26 +00:00
|
|
|
* `fuzztest`
|
|
|
|
|
|
|
|
Generates random changes to files in the current repository,
|
2015-03-25 16:09:49 +00:00
|
|
|
for use in testing the assistant.
|
|
|
|
|
|
|
|
See [[git-annex-fuzztest]](1) for details.
|
2014-08-01 16:49:26 +00:00
|
|
|
|
2016-01-12 17:01:44 +00:00
|
|
|
* `benchmark`
|
|
|
|
|
|
|
|
This runs git-annex's built-in benchmarks, if it was built with
|
|
|
|
benchmarking support.
|
2019-01-04 17:43:53 +00:00
|
|
|
|
|
|
|
See [[git-annex-benchmark]](1) for details.
|
2016-01-12 17:01:44 +00:00
|
|
|
|
addon commands
Seems only fair, that, like git runs git-annex, git-annex runs
git-annex-foo.
Implementation relies on O.forwardOptions, so that any options are passed
through to the addon program. Note that this includes options before the
subcommand, eg: git-annex -cx=y foo
Unfortunately, git-annex eats the --help/-h options.
This is because it uses O.hsubparser, which injects that option into each
subcommand. Seems like this should be possible to avoid somehow, to let
commands display their own --help, instead of the dummy one git-annex
displays.
The two step searching mirrors how git works, it makes finding
git-annex-foo fast when "git annex foo" is run, but will also support fuzzy
matching, once findAllAddonCommands gets implemented.
This commit was sponsored by Dr. Land Raider on Patreon.
2021-02-02 20:32:25 +00:00
|
|
|
# ADDON COMMANDS
|
|
|
|
|
|
|
|
In addition to all the commands listed above, more commands can be added to
|
|
|
|
git-annex by dropping commands named like "git-annex-foo" into a directory
|
|
|
|
in the PATH.
|
|
|
|
|
2019-09-01 16:56:28 +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`.
|
2020-12-17 16:17:58 +00:00
|
|
|
These settings, as well as relevant git config settings, are
|
|
|
|
the ones git-annex uses.
|
|
|
|
|
|
|
|
(Some of these settings can also be set, across all clones of the
|
|
|
|
repository, using [[git-annex-config]]. See its man page for a list.)
|
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).
|
|
|
|
|
2017-05-09 19:04:07 +00:00
|
|
|
* `annex.backend`
|
2010-12-10 21:30:13 +00:00
|
|
|
|
2017-05-09 19:04:07 +00:00
|
|
|
Name of the default key-value backend to use when adding new files
|
2022-09-26 19:59:10 +00:00
|
|
|
to the repository. See [[git-annex-backends]](1) for information about
|
|
|
|
available backends.
|
2010-12-10 21:30:13 +00:00
|
|
|
|
2016-02-02 19:18:17 +00:00
|
|
|
This is overridden by annex annex.backend configuration in the
|
2017-05-09 19:04:07 +00:00
|
|
|
.gitattributes files, and by the --backend option.
|
|
|
|
|
|
|
|
(This used to be named `annex.backends`, and that will still be used
|
|
|
|
if set.)
|
2016-02-02 19:18:17 +00:00
|
|
|
|
2017-02-27 17:50:00 +00:00
|
|
|
* `annex.securehashesonly`
|
|
|
|
|
|
|
|
Set to true to indicate that the repository should only use
|
2019-05-04 15:45:55 +00:00
|
|
|
cryptographically secure hashes (SHA2, SHA3) and not insecure
|
|
|
|
hashes (MD5, SHA1) for content.
|
2017-02-27 17:50:00 +00:00
|
|
|
|
|
|
|
When this is set, the contents of files using cryptographically
|
|
|
|
insecure hashes will not be allowed to be added to the repository.
|
2019-05-04 15:45:55 +00:00
|
|
|
|
2020-07-03 17:41:57 +00:00
|
|
|
Also, `git-annex fsck` will complain about any files present in
|
|
|
|
the repository that use insecure hashes. And,
|
|
|
|
`git-annex import --no-content` will refuse to import files
|
|
|
|
from special remotes using insecure hashes.
|
2019-05-04 15:45:55 +00:00
|
|
|
|
2017-02-27 20:08:16 +00:00
|
|
|
To configure the behavior in new clones of the repository,
|
2019-09-18 16:34:40 +00:00
|
|
|
this can be set using [[git-annex-config]].
|
2017-02-27 17:50:00 +00:00
|
|
|
|
2018-09-24 16:07:46 +00:00
|
|
|
* `annex.maxextensionlength`
|
|
|
|
|
2023-03-24 17:53:51 +00:00
|
|
|
Maximum length, in bytes, of what is considered a filename extension.
|
|
|
|
This is used when adding a file to a backend that preserves filename extensions,
|
|
|
|
and also when generating a view branch.
|
|
|
|
|
|
|
|
The default length is 4, which allows extensions like "jpeg". The dot before
|
handle keys with extensions consistently in all locales
Fix some cases where handling of keys with extensions varied depending on
the locale.
A filename with a unicode extension would before generate a key with an
extension in a unicode locale, but not in LANG=C, because the extension
was not all alphanumeric. Also the the length of the extension could be
counted differently depending on the locale.
In a non-unicode locale, git-annex migrate would see that the extension
was not all alphanumeric and want to "upgrade" it. Now that doesn't happen.
As far as backwards compatability, this does mean that unicode
extensions are counted by the number of bytes, not number of characters.
So, if someone is using unicode extensions, they may find git-annex
stops using them when adding files, because their extensions are too
long. Keys already in their repo with the "too long" extensions will
still work though, so this only prevents adding the same content with
the same extension generating the same key. Documented this by
documenting that annex.maxextensionlength is a number of bytes.
Also, if a filename has an extension that is not valid utf-8 and the
locale is utf-8, the extension will be allowed now, and an old
git-annex, in the same locale would not, and would also want to
"upgrade" that.
2020-02-20 21:18:59 +00:00
|
|
|
the extension is not counted part of its length. At most two extensions
|
|
|
|
at the end of a filename will be preserved, e.g. .gz or .tar.gz .
|
2018-09-24 16:07:46 +00:00
|
|
|
|
2011-10-14 22:23:17 +00:00
|
|
|
* `annex.diskreserve`
|
|
|
|
|
|
|
|
Amount of disk space to reserve. Disk space is checked when transferring
|
2022-09-21 19:00:13 +00:00
|
|
|
annexed content to avoid running out, and additional free space can be
|
|
|
|
reserved via this option, to make space for other data (such as git
|
|
|
|
commit logs). Can be specified with any commonly used units, for
|
|
|
|
example, "0.5 gb", "500M", or "100 KiloBytes"
|
2011-10-14 22:23:17 +00:00
|
|
|
|
2022-09-21 19:00:13 +00:00
|
|
|
The default reserve is 100 megabytes.
|
2011-10-14 22:23:17 +00:00
|
|
|
|
2020-05-28 19:55:17 +00:00
|
|
|
* `annex.skipunknown`
|
|
|
|
|
|
|
|
Set to true to make commands like "git-annex get" silently skip over
|
|
|
|
items that are listed in the command line, but are not checked into git.
|
|
|
|
|
|
|
|
Set to false to make it an error for commands like "git-annex get"
|
|
|
|
to be asked to operate on files that are not checked into git.
|
2022-02-18 17:18:05 +00:00
|
|
|
(This is the default in recent versions of git-annex.)
|
2020-05-28 19:55:17 +00:00
|
|
|
|
2023-09-13 16:57:24 +00:00
|
|
|
Note that, when annex.skipunknown is false, a command like "git-annex get
|
|
|
|
." will fail if no files in the current directory are checked into git.
|
|
|
|
Commands like "git-annex get foo/" will fail if no files in the directory
|
|
|
|
are checked into git, but if at least one file is, it will ignore other
|
|
|
|
files that are not. This is all the same as the behavior of "git-ls files
|
|
|
|
--error-unmatch".
|
2020-05-28 19:55:17 +00:00
|
|
|
|
|
|
|
Also note that git-annex skips files that are checked into git, but are
|
2023-09-13 16:57:24 +00:00
|
|
|
not annexed files; this setting does not affect that.
|
2020-05-28 19:55:17 +00:00
|
|
|
|
2013-03-29 20:17:13 +00:00
|
|
|
* `annex.largefiles`
|
|
|
|
|
2016-02-02 20:50:58 +00:00
|
|
|
Used to configure which files are large enough to be added to the annex.
|
2019-10-24 17:50:44 +00:00
|
|
|
It is an expression that matches the large files, eg
|
2021-01-04 17:11:05 +00:00
|
|
|
"`include=*.mp3 or largerthan=500kb`"
|
2019-12-20 19:01:34 +00:00
|
|
|
See [[git-annex-matching-expression]](1) for details on the syntax.
|
2016-02-02 20:50:58 +00:00
|
|
|
|
|
|
|
Overrides any annex.largefiles attributes in `.gitattributes` files.
|
git-annex config annex.largefiles
annex.largefiles can be configured by git-annex config, to more easily set
a default that will also be used by clones, without needing to shoehorn the
expression into the gitattributes file. The git config and gitattributes
override that.
Whenever something is added to git-annex config, we have to consider what
happens if a user puts a purposfully bad value in there. Or, if a new
git-annex adds some new value that an old git-annex can't parse.
In this case, a global annex.largefiles that can't be parsed currently
makes an error be thrown. That might not be ideal, but the gitattribute
behaves the same, and is almost equally repo-global.
Performance notes:
git-annex add and addurl construct a matcher once
and uses it for every file, so the added time penalty for reading the global
config log is minor. If the gitattributes annex.largefiles were deprecated,
git-annex add would get around 2% faster (excluding hashing), because
looking that up for each file is not fast. So this new way of setting
it is progress toward speeding up add.
git-annex smudge does need to load the log every time. As well as checking
the git attribute. Not ideal. Setting annex.gitaddtoannex=false avoids
both overheads.
2019-12-20 16:12:31 +00:00
|
|
|
|
|
|
|
To configure a default annex.largefiles for all clones of the repository,
|
|
|
|
this can be set in [[git-annex-config]](1).
|
2016-02-02 20:50:58 +00:00
|
|
|
|
2019-10-24 17:50:44 +00:00
|
|
|
This configures the behavior of both git-annex and git when adding
|
|
|
|
files to the repository. By default, `git-annex add` adds all files
|
2019-12-26 20:24:40 +00:00
|
|
|
to the annex (except dotfiles), and `git add` adds files to git
|
|
|
|
(unless they were added to the annex previously).
|
|
|
|
When annex.largefiles is configured, both
|
2019-10-24 17:50:44 +00:00
|
|
|
`git annex add` and `git add` will add matching large files to the
|
|
|
|
annex, and the other files to git.
|
2013-03-29 20:17:13 +00:00
|
|
|
|
2019-10-24 17:50:44 +00:00
|
|
|
Other git-annex commands also honor annex.largefiles, including
|
git-annex assist
assist: New command, which is the same as git-annex sync but with
new files added and content transferred by default.
(Also this fixes another reversion in git-annex sync,
--commit --no-commit, and --message were not enabled, oops.)
See added comment for why git-annex assist does commit staged
changes elsewhere in the work tree, but only adds files under
the cwd.
Note that it does not support --no-commit, --no-push, --no-pull
like sync does. My thinking is, why should it? If you want that
level of control, use git commit, git annex push, git annex pull.
Sync only got those options because pull and push were not split
out.
Sponsored-by: k0ld on Patreon
2023-05-18 18:37:29 +00:00
|
|
|
`git annex import`, `git annex addurl`, `git annex importfeed`,
|
|
|
|
`git-annex assist`, and the `git-annex assistant`.
|
2019-10-23 19:20:00 +00:00
|
|
|
|
2019-12-26 20:24:40 +00:00
|
|
|
* `annex.dotfiles`
|
|
|
|
|
|
|
|
Normally, dotfiles are assumed to be files like .gitignore,
|
|
|
|
whose content should always be part of the git repository, so
|
|
|
|
they will not be added to the annex. Setting annex.dotfiles to true
|
|
|
|
makes dotfiles be added to the annex the same as any other file.
|
|
|
|
|
|
|
|
To annex only some dotfiles, set this and configure annex.largefiles
|
|
|
|
to match the ones you want. For example, to match only dotfiles ending
|
|
|
|
in ".big"
|
|
|
|
|
|
|
|
git config annex.largefiles "(include=.*.big or include=*/.*.big) or (exclude=.* and exclude=*/.*)"
|
|
|
|
git config annex.dotfiles true
|
|
|
|
|
|
|
|
To configure a default annex.dotfiles for all clones of the repository,
|
|
|
|
this can be set in [[git-annex-config]](1).
|
|
|
|
|
2019-10-24 17:50:44 +00:00
|
|
|
* `annex.gitaddtoannex`
|
2019-10-23 19:20:00 +00:00
|
|
|
|
2019-12-20 14:35:44 +00:00
|
|
|
Setting this to false will prevent `git add` from adding
|
|
|
|
files to the annex, despite the annex.largefiles configuration.
|
2019-10-23 19:20:00 +00:00
|
|
|
|
2016-01-28 18:04:32 +00:00
|
|
|
* `annex.addsmallfiles`
|
|
|
|
|
|
|
|
Controls whether small files (not matching annex.largefiles)
|
|
|
|
should be checked into git by `git annex add`. Defaults to true;
|
|
|
|
set to false to instead make small files be skipped.
|
|
|
|
|
2016-02-16 18:43:43 +00:00
|
|
|
* `annex.addunlocked`
|
|
|
|
|
2019-12-20 19:01:34 +00:00
|
|
|
Commands like `git-annex add` default to adding files to the repository
|
|
|
|
in locked form. This can make them add the files in unlocked form,
|
|
|
|
the same as if [[git-annex-unlock]](1) were run on the files.
|
|
|
|
|
|
|
|
This can be set to "true" to add everything unlocked, or it can be a more
|
|
|
|
complicated expression that matches files by name, size, or content. See
|
|
|
|
[[git-annex-matching-expression]](1) for details.
|
|
|
|
|
|
|
|
To configure a default annex.addunlocked for all clones of the repository,
|
|
|
|
this can be set in [[git-annex-config]](1).
|
2019-09-18 16:14:45 +00:00
|
|
|
|
|
|
|
(Using `git add` always adds files in unlocked form and it is not
|
|
|
|
affected by this setting.)
|
2019-12-20 19:01:34 +00:00
|
|
|
|
2019-12-20 17:19:36 +00:00
|
|
|
When a repository has core.symlinks set to false, or has an adjusted
|
|
|
|
unlocked branch checked out, this setting is ignored, and files are
|
|
|
|
always added to the repository in unlocked form.
|
2016-02-16 18:43:43 +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
|
2016-02-02 19:18:17 +00:00
|
|
|
are kept across all repositories, or the annex.numcopies .gitattributes
|
|
|
|
setting.
|
2014-01-20 20:47:56 +00:00
|
|
|
|
|
|
|
This config setting is only looked at when `git annex numcopies` has
|
2016-02-02 19:18:17 +00:00
|
|
|
never been configured, and when there's no annex.numcopies setting in the
|
|
|
|
.gitattributes file.
|
2014-01-20 20:47:56 +00:00
|
|
|
|
2014-02-23 04:08:29 +00:00
|
|
|
* `annex.genmetadata`
|
|
|
|
|
|
|
|
Set this to `true` to make git-annex automatically generate some metadata
|
2014-08-19 05:22:24 +00:00
|
|
|
when adding files to the repository.
|
|
|
|
|
2017-10-25 19:11:12 +00:00
|
|
|
In particular, it stores year, month, and day metadata, from the file's
|
import metadata from feeds
When annex.genmetadata is set, metadata from the feed is added to files
that are imported from it.
Reused the same feedtitle and itemtitle, feedauthor, itemauthor, etc names
that are used in --template.
Also added title and author, which are the item title/author if available,
falling back to the feed title/author. These are more likely to be common
metadata fields.
(There is a small bit of dupication here, but once git gets
around to packing the object, it will compress it away.)
The itempubdate field is not included in the metadata as a string; instead
it is used to generate year and month fields, same as is done when adding
files with annex.genmetadata set.
This commit was sponsored by Amitai Schlair, who cooincidentially
is responsible for ikiwiki generating nice feed metadata!
2014-07-03 17:46:09 +00:00
|
|
|
modification date.
|
|
|
|
|
2015-03-31 17:29:51 +00:00
|
|
|
When importfeed is used, it stores additional metadata from the feed,
|
|
|
|
such as the author, title, etc.
|
2014-02-23 04:08:29 +00:00
|
|
|
|
2015-05-14 19:44:08 +00:00
|
|
|
* `annex.used-refspec`
|
|
|
|
|
|
|
|
This controls which refs `git-annex unused` considers to be used.
|
|
|
|
See REFSPEC FORMAT in [[git-annex-unused]](1) for details.
|
|
|
|
|
2019-09-18 16:27:10 +00:00
|
|
|
* `annex.jobs`
|
2018-10-04 16:47:27 +00:00
|
|
|
|
|
|
|
Configure the number of concurrent jobs to run. Default is 1.
|
|
|
|
|
|
|
|
Only git-annex commands that support the --jobs option will
|
|
|
|
use this.
|
|
|
|
|
2019-05-10 17:24:31 +00:00
|
|
|
Setting this to "cpus" will run one job per CPU core.
|
|
|
|
|
support --batch -J
--batch combined with -J now runs batch requests concurrently for many
commands. Before, the combination was accepted, but did not enable
concurrency. Since the output of batch requests can be in any order, --json
with the new "input" field is recommended to be used, to determine which
batch request each response corresponds to.
If --json is not used, batch mode still runs concurrently, using the usual
concurrent-output. That will not be very useful for most batch mode users,
probably, but who knows.
If a program was using --batch -J before, and was parsing non-json output,
this could break it. But, it was relying on git-annex not supporting
concurrency despite it being enabled, so it should have expected concurrent
output. So, I think that's ok.
annex.jobs does not enable concurrency in --batch mode, because that would
confuse programs that use --batch but don't expect concurrency.
2020-09-16 15:58:19 +00:00
|
|
|
When the `--batch` option is used, this configuration is ignored.
|
|
|
|
|
2020-11-16 18:09:55 +00:00
|
|
|
* `annex.adjustedbranchrefresh`
|
|
|
|
|
|
|
|
When [[git-annex-adjust]](1) is used to set up an adjusted branch
|
|
|
|
that needs to be refreshed after getting or dropping files, this config
|
|
|
|
controls how frequently the branch is refreshed.
|
|
|
|
|
|
|
|
Refreshing the branch takes some time, so doing it after every file
|
2020-11-16 18:31:02 +00:00
|
|
|
can be too slow. (It also can generate a lot of dangling git objects.)
|
|
|
|
The default value is 0 (or false), which does not
|
|
|
|
refresh the branch. Setting 1 (or true) will refresh only once,
|
|
|
|
after git-annex has made other changes. Setting 2 refreshes after every
|
|
|
|
file, 3 after every other file, and so on; setting 100 refreshes after
|
|
|
|
every 99 files.
|
2020-11-16 18:09:55 +00:00
|
|
|
|
|
|
|
(If git-annex gets faster in the future, refresh rates will increase
|
|
|
|
proportional to the speed improvements.)
|
|
|
|
|
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`
|
|
|
|
|
2015-06-16 21:58:15 +00:00
|
|
|
The `git annex unused` and `git annex sync --content` commands use
|
|
|
|
a bloom filter to determine what files are present in eg, the work tree.
|
|
|
|
The default bloom filter is sized to handle
|
|
|
|
up to 500000 files. If your repository is larger than that,
|
|
|
|
you should increase this value. Larger values will
|
|
|
|
make `git-annex unused` and `git annex sync --content` 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
|
2015-06-16 21:58:15 +00:00
|
|
|
`git annex unused` and `git annex sync --content`.
|
|
|
|
The default accuracy is 10000000 -- 1 unused file out of 10000000
|
|
|
|
will be missed by `git annex unused`. Increasing the accuracy will make
|
|
|
|
`git annex unused` consume more memory; 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
|
|
|
|
2021-05-27 16:37:39 +00:00
|
|
|
* `annex.adviceNoSshCaching`
|
|
|
|
|
|
|
|
When git-annex is unable to use ssh connection caching, or has been
|
|
|
|
configured not to, and concurrency is enabled, it will warn that
|
|
|
|
this might result in multiple ssh processes prompting for passwords
|
|
|
|
at the same time. To disable that warning, eg if you have configured ssh
|
|
|
|
connection caching yourself, or have ssh agent caching passwords,
|
|
|
|
set this to `false`.
|
|
|
|
|
2012-02-25 19:23:17 +00:00
|
|
|
* `annex.alwayscommit`
|
|
|
|
|
|
|
|
By default, git-annex automatically commits data to the git-annex branch
|
2014-07-14 18:37:14 +00:00
|
|
|
after each command is run. If you have a series
|
2014-08-19 05:22:24 +00:00
|
|
|
of commands that you want to make a single commit, you can
|
2014-07-14 18:37:14 +00:00
|
|
|
run the commands with `-c annex.alwayscommit=false`. You can later
|
|
|
|
commit the data by running `git annex merge` (or by automatic merges)
|
|
|
|
or `git annex sync`.
|
2012-02-25 19:23:17 +00:00
|
|
|
|
2018-08-02 18:06:06 +00:00
|
|
|
* `annex.commitmessage`
|
|
|
|
|
|
|
|
When git-annex updates the git-annex branch, it usually makes up
|
2021-05-17 17:24:58 +00:00
|
|
|
its own commit message (eg "update"), since users rarely look at or
|
2018-08-02 18:06:06 +00:00
|
|
|
care about changes to that branch. If you do care, you can
|
|
|
|
specify this setting by running commands with
|
|
|
|
`-c annex.commitmessage=whatever`
|
|
|
|
|
|
|
|
This works well in combination with annex.alwayscommit=false,
|
|
|
|
to gather up a set of changes and commit them with a message you specify.
|
|
|
|
|
2022-07-18 19:50:36 +00:00
|
|
|
* `annex.alwayscompact`
|
|
|
|
|
|
|
|
By default, git-annex compacts data it records in the git-annex branch.
|
|
|
|
Setting this to false avoids doing that compaction in some cases, which
|
|
|
|
can speed up operations that populate the git-annex branch with a lot
|
|
|
|
of data. However, when used with operations that overwrite old values in
|
|
|
|
the git-annex branch, that may cause the git-annex branch to use more disk
|
2022-07-20 16:39:03 +00:00
|
|
|
space, and so slow down reading data from it.
|
2022-07-18 19:50:36 +00:00
|
|
|
|
|
|
|
An example of a command that can be sped up by using
|
|
|
|
`-c annex.alwayscompact=false` is `git-annex registerurl --batch`,
|
|
|
|
when adding a large number of urls to the same key.
|
|
|
|
|
2022-07-20 17:19:06 +00:00
|
|
|
This option was first supported by git-annex version 10.20220724.
|
|
|
|
It is not entirely safe to set this option in a repository that may also
|
|
|
|
be used by an older version of git-annex at the same time as a version
|
|
|
|
that supports this option.
|
|
|
|
|
2019-11-11 20:15:05 +00:00
|
|
|
* `annex.allowsign`
|
|
|
|
|
|
|
|
By default git-annex avoids gpg signing commits that it makes when
|
|
|
|
they're not the purpose of a command, but only a side effect.
|
|
|
|
That default avoids lots of gpg password prompts when
|
|
|
|
commit.gpgSign is set. A command like `git annex sync` or `git annex merge`
|
|
|
|
will gpg sign its commit, but a command like `git annex get`,
|
|
|
|
that updates the git-annex branch, will not. The assistant also avoids
|
|
|
|
signing commits.
|
|
|
|
|
|
|
|
Setting annex.allowsign to true lets all commits be signed, as
|
|
|
|
controlled by commit.gpgSign and other git configuration.
|
|
|
|
|
2018-02-22 18:25:32 +00:00
|
|
|
* `annex.merge-annex-branches`
|
|
|
|
|
|
|
|
By default, git-annex branches that have been pulled from remotes
|
|
|
|
are automatically merged into the local git-annex branch, so that
|
|
|
|
git-annex has the most up-to-date possible knowledge.
|
|
|
|
|
2021-12-27 18:30:51 +00:00
|
|
|
To avoid that merging, set this to "false".
|
|
|
|
|
|
|
|
This can be useful particularly when you don't have write permission
|
|
|
|
to the repository. While git-annex is mostly able to work in a read-only
|
|
|
|
repository with unmerged git-annex branches, some things do not work,
|
|
|
|
and when it does work it will be slower due to needing to look at each of
|
|
|
|
the unmerged branches.
|
2018-02-22 18:25:32 +00:00
|
|
|
|
2021-04-23 18:36:20 +00:00
|
|
|
* `annex.private`
|
2021-04-21 21:01:03 +00:00
|
|
|
|
|
|
|
When this is set to true, no information about the repository will be
|
|
|
|
recorded in the git-annex branch.
|
|
|
|
|
|
|
|
For example, to make a repository without any mention of it ever
|
|
|
|
appearing in the git-annex branch:
|
|
|
|
|
2021-04-23 18:36:20 +00:00
|
|
|
git init myprivate
|
2021-04-21 21:01:03 +00:00
|
|
|
cd myprivaterepo
|
2021-04-23 18:36:20 +00:00
|
|
|
git config annex.private true
|
2021-04-21 21:01:03 +00:00
|
|
|
git annex init
|
|
|
|
|
2014-09-05 17:44:09 +00:00
|
|
|
* `annex.hardlink`
|
|
|
|
|
2015-09-14 16:13:38 +00:00
|
|
|
Set this to `true` to make file contents be hard linked between the
|
|
|
|
repository and its remotes when possible, instead of a more expensive copy.
|
2014-09-05 17:44:09 +00:00
|
|
|
|
|
|
|
Use with caution -- This can invalidate numcopies counting, since
|
|
|
|
with hard links, fewer copies of a file can exist. So, it is a good
|
|
|
|
idea to mark a repository using this setting as untrusted.
|
|
|
|
|
|
|
|
When a repository is set up using `git clone --shared`, git-annex init
|
|
|
|
will automatically set annex.hardlink and mark the repository as
|
|
|
|
untrusted.
|
|
|
|
|
2020-08-25 17:34:37 +00:00
|
|
|
When `annex.thin` is also set, setting `annex.hardlink` has no effect.
|
|
|
|
|
2015-12-27 19:59:59 +00:00
|
|
|
* `annex.thin`
|
|
|
|
|
|
|
|
Set this to `true` to make unlocked files be a hard link to their content
|
2018-10-26 17:35:13 +00:00
|
|
|
in the annex, rather than a second copy. This can save considerable
|
2016-04-13 17:34:24 +00:00
|
|
|
disk space, but when a modification is made to a file, you will lose the
|
2023-06-21 19:39:15 +00:00
|
|
|
local (and possibly only) copy of the old version. Any other, locked
|
|
|
|
files in the repository that pointed to that content will get broken
|
|
|
|
as well (`git-annex fsck` will detect and clean up after that).
|
|
|
|
So, enable this with care.
|
2015-12-27 19:59:59 +00:00
|
|
|
|
2016-04-13 16:48:44 +00:00
|
|
|
After setting (or unsetting) this, you should run `git annex fix` to
|
|
|
|
fix up the annexed files in the work tree to be hard links (or copies).
|
2018-10-26 17:35:13 +00:00
|
|
|
|
|
|
|
Note that this has no effect when the filesystem does not support hard links.
|
|
|
|
And when multiple files in the work tree have the same content, only
|
|
|
|
one of them gets hard linked to the annex.
|
2016-04-13 16:48:44 +00:00
|
|
|
|
2021-04-21 16:36:34 +00:00
|
|
|
* `annex.supportunlocked`
|
2021-03-23 18:04:34 +00:00
|
|
|
|
|
|
|
By default git-annex supports unlocked files as well as locked files,
|
|
|
|
so this defaults to true. If set to false, git-annex will only support
|
|
|
|
locked files. That will avoid doing the work needed to support unlocked
|
|
|
|
files.
|
|
|
|
|
|
|
|
Note that setting this to false does not prevent a repository from
|
|
|
|
having unlocked files added to it, and in that case the content of the
|
|
|
|
files will not be accessible until they are locked.
|
|
|
|
|
|
|
|
After changing this config, you need to re-run `git-annex init` for it
|
|
|
|
to take effect.
|
|
|
|
|
2017-06-01 16:46:36 +00:00
|
|
|
* `annex.resolvemerge`
|
|
|
|
|
2018-02-22 18:25:32 +00:00
|
|
|
Set to false to prevent merge conflicts in the checked out branch
|
git-annex pull and push
Split out two new commands, git-annex pull and git-annex push. Those plus a
git commit are equivilant to git-annex sync.
In a sense, git-annex sync conflates 3 things, and it would have been
better to have push and pull from the beginning and not sync. Although
note that git-annex sync --content is faster than a pull followed by a
push, because it only has to walk the tree once, look at preferred
content once, etc. So there is some value in git-annex sync in speed, as
well as user convenience.
And it would be hard to split out pull and push from sync, as far as the
implementaton goes. The implementation inside sync was easy, just adjust
SyncOptions so it does the right thing.
Note that the new commands default to syncing content, unless
annex.synccontent is explicitly set to false. I'd like sync to also do
that, but that's a hard transition to make. As a start to that
transition, I added a note to git-annex-sync.mdwn that it may start to
do so in a future version of git-annex. But a real transition would
necessarily involve displaying warnings when sync is used without
--content, and time.
Sponsored-by: Kevin Mueller on Patreon
2023-05-16 20:37:30 +00:00
|
|
|
being automatically resolved by the `git-annex assitant`,
|
git-annex assist
assist: New command, which is the same as git-annex sync but with
new files added and content transferred by default.
(Also this fixes another reversion in git-annex sync,
--commit --no-commit, and --message were not enabled, oops.)
See added comment for why git-annex assist does commit staged
changes elsewhere in the work tree, but only adds files under
the cwd.
Note that it does not support --no-commit, --no-push, --no-pull
like sync does. My thinking is, why should it? If you want that
level of control, use git commit, git annex push, git annex pull.
Sync only got those options because pull and push were not split
out.
Sponsored-by: k0ld on Patreon
2023-05-18 18:37:29 +00:00
|
|
|
`git-annex assist`, `git-annex sync`, `git-annex pull`, `git-annex merge`,
|
2017-06-01 16:46:36 +00:00
|
|
|
and the git-annex post-receive hook.
|
|
|
|
|
|
|
|
To configure the behavior in all clones of the repository,
|
2019-09-18 16:34:40 +00:00
|
|
|
this can be set in [[git-annex-config]](1).
|
2017-01-30 20:41:29 +00:00
|
|
|
|
2017-02-03 18:31:17 +00:00
|
|
|
* `annex.synccontent`
|
|
|
|
|
git-annex pull and push
Split out two new commands, git-annex pull and git-annex push. Those plus a
git commit are equivilant to git-annex sync.
In a sense, git-annex sync conflates 3 things, and it would have been
better to have push and pull from the beginning and not sync. Although
note that git-annex sync --content is faster than a pull followed by a
push, because it only has to walk the tree once, look at preferred
content once, etc. So there is some value in git-annex sync in speed, as
well as user convenience.
And it would be hard to split out pull and push from sync, as far as the
implementaton goes. The implementation inside sync was easy, just adjust
SyncOptions so it does the right thing.
Note that the new commands default to syncing content, unless
annex.synccontent is explicitly set to false. I'd like sync to also do
that, but that's a hard transition to make. As a start to that
transition, I added a note to git-annex-sync.mdwn that it may start to
do so in a future version of git-annex. But a real transition would
necessarily involve displaying warnings when sync is used without
--content, and time.
Sponsored-by: Kevin Mueller on Patreon
2023-05-16 20:37:30 +00:00
|
|
|
Set to true to make `git-annex sync` default to transferring
|
|
|
|
annexed content.
|
|
|
|
|
git-annex assist
assist: New command, which is the same as git-annex sync but with
new files added and content transferred by default.
(Also this fixes another reversion in git-annex sync,
--commit --no-commit, and --message were not enabled, oops.)
See added comment for why git-annex assist does commit staged
changes elsewhere in the work tree, but only adds files under
the cwd.
Note that it does not support --no-commit, --no-push, --no-pull
like sync does. My thinking is, why should it? If you want that
level of control, use git commit, git annex push, git annex pull.
Sync only got those options because pull and push were not split
out.
Sponsored-by: k0ld on Patreon
2023-05-18 18:37:29 +00:00
|
|
|
Set to false to prevent `git-annex assist`, `git-annex pull` and
|
|
|
|
`git-annex push` from transferring annexed content.
|
sync --only-annex and annex.synconlyannex
* Added sync --only-annex, which syncs the git-annex branch and annexed
content but leaves managing the other git branches up to you.
* Added annex.synconlyannex git config setting, which can also be set with
git-annex config to configure sync in all clones of the repo.
Use case is then the user has their own git workflow, and wants to use
git-annex without disrupting that, so they sync --only-annex to get the
git-annex stuff in sync in addition to their usual git workflow.
When annex.synconlyannex is set, --not-only-annex can be used to override
it.
It's not entirely clear what --only-annex --commit or --only-annex
--push should do, and I left that combination not documented because I
don't know if I might want to change the current behavior, which is that
such options do not override the --only-annex. My gut feeling is that
there is no good reasons to use such combinations; if you want to use
your own git workflow, you'll be doing your own committing and pulling
and pushing.
A subtle question is, how should import/export special remotes be handled?
Importing updates their remote tracking branch and merges it into master.
If --only-annex prevented that git branch stuff, then it would prevent
exporting to the special remote, in the case where it has changes that
were not imported yet, because there would be a unresolved conflict.
I decided that it's best to treat the fact that there's a remote tracking
branch for import/export as an implementation detail in this case. The more
important thing is that an import/export special remote is entirely annexed
content, and so it makes a lot of sense that --only-annex will still sync
with it.
2020-02-17 19:19:58 +00:00
|
|
|
|
|
|
|
To configure the behavior in all clones of the repository,
|
|
|
|
this can be set in [[git-annex-config]](1).
|
|
|
|
|
|
|
|
* `annex.synconlyannex`
|
|
|
|
|
git-annex assist
assist: New command, which is the same as git-annex sync but with
new files added and content transferred by default.
(Also this fixes another reversion in git-annex sync,
--commit --no-commit, and --message were not enabled, oops.)
See added comment for why git-annex assist does commit staged
changes elsewhere in the work tree, but only adds files under
the cwd.
Note that it does not support --no-commit, --no-push, --no-pull
like sync does. My thinking is, why should it? If you want that
level of control, use git commit, git annex push, git annex pull.
Sync only got those options because pull and push were not split
out.
Sponsored-by: k0ld on Patreon
2023-05-18 18:37:29 +00:00
|
|
|
Set to true to make `git-annex assist`, `git-annex sync`,
|
|
|
|
`git-annex pull`, and `git-annex push` default to only operating
|
|
|
|
on the git-annex branch and annexed content.
|
2017-02-03 18:31:17 +00:00
|
|
|
|
|
|
|
To configure the behavior in all clones of the repository,
|
2019-09-18 16:34:40 +00:00
|
|
|
this can be set in [[git-annex-config]](1).
|
2017-02-03 18:31:17 +00:00
|
|
|
|
2023-12-08 18:18:18 +00:00
|
|
|
* `annex.syncmigrations`
|
|
|
|
|
|
|
|
Set to false to prevent `git-annex sync` and `git-annex pull`
|
|
|
|
from scanning for migrations and updating the local
|
|
|
|
repository for those migrations.
|
|
|
|
|
2023-02-07 20:28:46 +00:00
|
|
|
* `annex.viewunsetdirectory`
|
|
|
|
|
|
|
|
This configures the name of a directory that is used in a view to contain
|
|
|
|
files that do not have metadata set. The default name for the directory
|
|
|
|
is `"_"`. See [[git-annex-view]](1) for details.
|
|
|
|
|
2013-06-18 00:41:17 +00:00
|
|
|
* `annex.debug`
|
|
|
|
|
|
|
|
Set to true to enable debug logging by default.
|
|
|
|
|
2021-04-05 19:21:20 +00:00
|
|
|
* `annex.debugfilter`
|
|
|
|
|
|
|
|
Set to configure which debug messages to display (when debug message
|
|
|
|
display has been enabled by annex.debug or --debug). The value is one
|
|
|
|
or more module names, separated by commas.
|
|
|
|
|
2013-03-29 20:17:13 +00:00
|
|
|
* `annex.version`
|
|
|
|
|
2019-09-01 17:29:55 +00:00
|
|
|
The current version of the git-annex repository. This is
|
|
|
|
maintained by git-annex and should never be manually changed.
|
|
|
|
|
|
|
|
* `annex.autoupgraderepository`
|
|
|
|
|
2022-07-25 20:09:11 +00:00
|
|
|
When an old git-annex repository version is no longer supported,
|
2019-09-01 17:29:55 +00:00
|
|
|
git-annex will normally automatically upgrade the repository to
|
2022-07-25 20:09:11 +00:00
|
|
|
the new version. It may also sometimes upgrade from an old repository
|
|
|
|
version that is still supported but that is not as good as a later
|
|
|
|
version.
|
2019-09-01 17:29:55 +00:00
|
|
|
|
|
|
|
If this is set to false, git-annex won't automatically upgrade the
|
2022-07-25 20:09:11 +00:00
|
|
|
repository. If the repository version is not supported, git-annex
|
|
|
|
will instead exit with an error message. If it is still supported,
|
|
|
|
git-annex will continue to work.
|
|
|
|
|
|
|
|
You can run `git annex upgrade` yourself when you are ready to upgrade the
|
2019-09-01 17:29:55 +00:00
|
|
|
repository.
|
2013-03-29 20: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
|
|
|
|
2015-11-12 21:47:31 +00:00
|
|
|
* `annex.pidlock`
|
|
|
|
|
|
|
|
Normally, git-annex uses fine-grained lock files to allow multiple
|
|
|
|
processes to run concurrently without getting in each others' way.
|
|
|
|
That works great, unless you are using git-annex on a filesystem that
|
|
|
|
does not support POSIX fcntl locks. This is sometimes the case when
|
|
|
|
using NFS or Lustre filesystems.
|
|
|
|
|
|
|
|
To support such situations, you can set annex.pidlock to true, and it
|
|
|
|
will fall back to a single top-level pid file lock.
|
|
|
|
|
2015-11-13 19:55:16 +00:00
|
|
|
Although, often, you'd really be better off fixing your networked
|
|
|
|
filesystem configuration to support POSIX locks.. And, some networked
|
|
|
|
filesystems are so inconsistent that one node can't reliably tell when
|
|
|
|
the other node is holding a pid lock. Caveat emptor.
|
2015-11-12 21:47:31 +00:00
|
|
|
|
|
|
|
* `annex.pidlocktimeout`
|
2020-08-26 17:05:34 +00:00
|
|
|
|
|
|
|
git-annex will wait up to this many seconds for the pid lock
|
|
|
|
file to go away, and will then abort if it cannot continue. Default: 300
|
2015-11-12 21:47:31 +00:00
|
|
|
|
|
|
|
When using pid lock files, it's possible for a stale lock file to get
|
|
|
|
left behind by previous run of git-annex that crashed or was interrupted.
|
|
|
|
This is mostly avoided, but can occur especially when using a network
|
2020-08-26 17:05:34 +00:00
|
|
|
file system. This timeout prevents git-annex waiting forever in such a
|
|
|
|
situation.
|
2015-11-12 21:47:31 +00:00
|
|
|
|
2022-08-11 20:57:44 +00:00
|
|
|
* `annex.dbdir`
|
|
|
|
|
2022-08-12 16:56:56 +00:00
|
|
|
The directory where git-annex should store its sqlite databases.
|
2022-08-11 20:57:44 +00:00
|
|
|
The default location is inside `.git/annex/`.
|
|
|
|
|
|
|
|
Certian filesystems, such as cifs, may not support locking operations
|
|
|
|
that sqlite needs, and setting this to a directory on another filesystem
|
|
|
|
can work around such a problem.
|
|
|
|
|
2022-08-12 17:18:15 +00:00
|
|
|
This can safely be set to the same directory in the configuration of
|
|
|
|
multiple repositories; each repository will use a subdirectory for its
|
|
|
|
sqlite database.
|
|
|
|
|
2018-12-04 18:16:56 +00:00
|
|
|
* `annex.cachecreds`
|
|
|
|
|
|
|
|
When "true" (the default), git-annex will cache credentials used to
|
|
|
|
access special remotes in files in .git/annex/creds/
|
|
|
|
that only you can read. To disable that caching, set to "false",
|
|
|
|
and credentials will only be read from the environment, or if
|
|
|
|
they have been embedded in encrypted form in the git repository, will
|
|
|
|
be extracted and decrypted each time git-annex needs to access the
|
|
|
|
remote.
|
|
|
|
|
2019-09-01 16:56:28 +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`.
|
|
|
|
|
Added annex.freezecontent-command and annex.thawcontent-command configs
Freeze first sets the file perms, and then runs
freezecontent-command. Thaw runs thawcontent-command before
restoring file permissions. This is in case the freeze command
prevents changing file perms, as eg setting a file immutable does.
Also, changing file perms tends to mess up previously set ACLs.
git-annex init's probe for crippled filesystem uses them, so if file perms
don't work, but freezecontent-command manages to prevent write to a file,
it won't treat the filesystem as crippled.
When the the filesystem has been probed as crippled, the hooks are not
used, because there seems to be no point then; git-annex won't be relying
on locking annex objects down. Also, this avoids them being run when the
file perms have not been changed, in case they somehow rely on
git-annex's setting of the file perms in order to work.
Sponsored-by: Dartmouth College's Datalad project
2021-06-21 18:40:20 +00:00
|
|
|
* `annex.freezecontent-command`, `annex.thawcontent-command`
|
|
|
|
|
|
|
|
Usually the write permission bits are unset to protect annexed objects
|
|
|
|
from being modified or deleted. The freezecontent-command is run after
|
2022-02-24 17:28:31 +00:00
|
|
|
git-annex has removed (or attempted to remove) the write bit, and can
|
|
|
|
be used to prevent writing in some other way.
|
|
|
|
The thawcontent-command should undo its effect, and is run before
|
|
|
|
git-annex restores the write bit.
|
Added annex.freezecontent-command and annex.thawcontent-command configs
Freeze first sets the file perms, and then runs
freezecontent-command. Thaw runs thawcontent-command before
restoring file permissions. This is in case the freeze command
prevents changing file perms, as eg setting a file immutable does.
Also, changing file perms tends to mess up previously set ACLs.
git-annex init's probe for crippled filesystem uses them, so if file perms
don't work, but freezecontent-command manages to prevent write to a file,
it won't treat the filesystem as crippled.
When the the filesystem has been probed as crippled, the hooks are not
used, because there seems to be no point then; git-annex won't be relying
on locking annex objects down. Also, this avoids them being run when the
file perms have not been changed, in case they somehow rely on
git-annex's setting of the file perms in order to work.
Sponsored-by: Dartmouth College's Datalad project
2021-06-21 18:40:20 +00:00
|
|
|
|
|
|
|
In the command line, %path is replaced with the file or directory to
|
|
|
|
operate on.
|
|
|
|
|
2022-09-26 17:10:47 +00:00
|
|
|
(When annex.crippledfilesystem is set, git-annex will not try to
|
|
|
|
remove/restore the write bit, but it will still run these hooks.)
|
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
* `annex.tune.objecthash1`, `annex.tune.objecthashlower`, `annex.tune.branchhash1`
|
|
|
|
|
|
|
|
These can be passed to `git annex init` to tune the repository.
|
|
|
|
They cannot be safely changed in a running repository and should never be
|
|
|
|
set in global git configuration.
|
|
|
|
For details, see <https://git-annex.branchable.com/tuning/>.
|
|
|
|
|
|
|
|
# CONFIGURATION OF REMOTES
|
|
|
|
|
|
|
|
Remotes are configured using these settings in `.git/config`.
|
|
|
|
|
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.
|
2017-08-17 16:26:14 +00:00
|
|
|
This allows varying the cost based on e.g., the current network.
|
2011-08-18 16:20:47 +00:00
|
|
|
|
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.
|
|
|
|
|
2014-05-16 11:34:43 +00:00
|
|
|
* `remote.<name>.annex-shell`
|
|
|
|
|
|
|
|
Specify an alternative git-annex-shell executable on the remote
|
|
|
|
instead of looking for "git-annex-shell" on the PATH.
|
|
|
|
|
|
|
|
This is useful if the git-annex-shell program is outside the PATH
|
|
|
|
or has a non-standard name.
|
|
|
|
|
2010-12-10 21:30:13 +00:00
|
|
|
* `remote.<name>.annex-ignore`
|
|
|
|
|
2023-11-30 19:11:57 +00:00
|
|
|
If set to `true`, prevents git-annex from storing or retrieving annexed
|
|
|
|
file contents on this remote by default.
|
|
|
|
(You can still request it be used with 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
|
|
|
|
git-annex assist
assist: New command, which is the same as git-annex sync but with
new files added and content transferred by default.
(Also this fixes another reversion in git-annex sync,
--commit --no-commit, and --message were not enabled, oops.)
See added comment for why git-annex assist does commit staged
changes elsewhere in the work tree, but only adds files under
the cwd.
Note that it does not support --no-commit, --no-push, --no-pull
like sync does. My thinking is, why should it? If you want that
level of control, use git commit, git annex push, git annex pull.
Sync only got those options because pull and push were not split
out.
Sponsored-by: k0ld on Patreon
2023-05-18 18:37:29 +00:00
|
|
|
This does not prevent `git-annex sync`, `git-annex pull`, `git-annex push`,
|
|
|
|
`git-annex assist` or the `git-annex assistant` from operating on the
|
2023-11-30 19:11:57 +00:00
|
|
|
git repository. It only affects annexed content.
|
2013-04-22 18:57:09 +00:00
|
|
|
|
2017-08-17 16:26:14 +00:00
|
|
|
* `remote.<name>.annex-ignore-command`
|
|
|
|
|
|
|
|
If set, the command is run, and if it exits nonzero, that's the same
|
|
|
|
as setting annex-ignore to true. This allows controlling behavior based
|
|
|
|
on e.g., the current network.
|
|
|
|
|
2012-10-11 22:39:21 +00:00
|
|
|
* `remote.<name>.annex-sync`
|
|
|
|
|
git-annex assist
assist: New command, which is the same as git-annex sync but with
new files added and content transferred by default.
(Also this fixes another reversion in git-annex sync,
--commit --no-commit, and --message were not enabled, oops.)
See added comment for why git-annex assist does commit staged
changes elsewhere in the work tree, but only adds files under
the cwd.
Note that it does not support --no-commit, --no-push, --no-pull
like sync does. My thinking is, why should it? If you want that
level of control, use git commit, git annex push, git annex pull.
Sync only got those options because pull and push were not split
out.
Sponsored-by: k0ld on Patreon
2023-05-18 18:37:29 +00:00
|
|
|
If set to `false`, prevents `git-annex sync` (and `git-annex pull`,
|
|
|
|
`git-annex push`, `git-annex assist`, and the `git-annex assistant`)
|
|
|
|
from operating on this remote by default.
|
Added remote.<name>.annex-push and remote.<name>.annex-pull
The former can be useful to make remotes that don't get fully synced with
local changes, which comes up in a lot of situations.
The latter was mostly added for symmetry, but could be useful (though less
likely to be).
Implementing `remote.<name>.annex-pull` was a bit tricky, as there's no one
place where git-annex pulls/fetches from remotes. I audited all
instances of "fetch" and "pull". A few cases were left not checking this
config:
* Git.Repair can try to pull missing refs from a remote, and if the local
repo is corrupted, that seems a reasonable thing to do even though
the config would normally prevent it.
* Assistant.WebApp.Gpg and Remote.Gcrypt and Remote.Git do fetches
as part of the setup process of a remote. The config would probably not
be set then, and having the setup fail seems worse than honoring it if it
is already set.
I have not prevented all the code that does a "merge" from merging branches
from remotes with remote.<name>.annex-pull=false. That could perhaps
be done, but it would need a way to map from branch name to remote name,
and the way refspecs work makes that hard to get really correct. So if the
user fetches manually, the git-annex branch will get merged, for example.
Anther way of looking at/justifying this is that the setting is called
"annex-pull", not "annex-merge".
This commit was supported by the NSF-funded DataLad project.
2017-04-05 17:04:02 +00:00
|
|
|
|
2017-08-17 16:26:14 +00:00
|
|
|
* `remote.<name>.annex-sync-command`
|
|
|
|
|
|
|
|
If set, the command is run, and if it exits nonzero, that's the same
|
|
|
|
as setting annex-sync to false. This allows controlling behavior based
|
|
|
|
on e.g., the current network.
|
|
|
|
|
Added remote.<name>.annex-push and remote.<name>.annex-pull
The former can be useful to make remotes that don't get fully synced with
local changes, which comes up in a lot of situations.
The latter was mostly added for symmetry, but could be useful (though less
likely to be).
Implementing `remote.<name>.annex-pull` was a bit tricky, as there's no one
place where git-annex pulls/fetches from remotes. I audited all
instances of "fetch" and "pull". A few cases were left not checking this
config:
* Git.Repair can try to pull missing refs from a remote, and if the local
repo is corrupted, that seems a reasonable thing to do even though
the config would normally prevent it.
* Assistant.WebApp.Gpg and Remote.Gcrypt and Remote.Git do fetches
as part of the setup process of a remote. The config would probably not
be set then, and having the setup fail seems worse than honoring it if it
is already set.
I have not prevented all the code that does a "merge" from merging branches
from remotes with remote.<name>.annex-pull=false. That could perhaps
be done, but it would need a way to map from branch name to remote name,
and the way refspecs work makes that hard to get really correct. So if the
user fetches manually, the git-annex branch will get merged, for example.
Anther way of looking at/justifying this is that the setting is called
"annex-pull", not "annex-merge".
This commit was supported by the NSF-funded DataLad project.
2017-04-05 17:04:02 +00:00
|
|
|
* `remote.<name>.annex-pull`
|
|
|
|
|
git-annex assist
assist: New command, which is the same as git-annex sync but with
new files added and content transferred by default.
(Also this fixes another reversion in git-annex sync,
--commit --no-commit, and --message were not enabled, oops.)
See added comment for why git-annex assist does commit staged
changes elsewhere in the work tree, but only adds files under
the cwd.
Note that it does not support --no-commit, --no-push, --no-pull
like sync does. My thinking is, why should it? If you want that
level of control, use git commit, git annex push, git annex pull.
Sync only got those options because pull and push were not split
out.
Sponsored-by: k0ld on Patreon
2023-05-18 18:37:29 +00:00
|
|
|
If set to `false`, prevents `git-annex pull`, `git-annex sync`,
|
|
|
|
`git-annex assist` and the `git-annex assistant` from ever pulling
|
|
|
|
(or fetching) from the remote.
|
Added remote.<name>.annex-push and remote.<name>.annex-pull
The former can be useful to make remotes that don't get fully synced with
local changes, which comes up in a lot of situations.
The latter was mostly added for symmetry, but could be useful (though less
likely to be).
Implementing `remote.<name>.annex-pull` was a bit tricky, as there's no one
place where git-annex pulls/fetches from remotes. I audited all
instances of "fetch" and "pull". A few cases were left not checking this
config:
* Git.Repair can try to pull missing refs from a remote, and if the local
repo is corrupted, that seems a reasonable thing to do even though
the config would normally prevent it.
* Assistant.WebApp.Gpg and Remote.Gcrypt and Remote.Git do fetches
as part of the setup process of a remote. The config would probably not
be set then, and having the setup fail seems worse than honoring it if it
is already set.
I have not prevented all the code that does a "merge" from merging branches
from remotes with remote.<name>.annex-pull=false. That could perhaps
be done, but it would need a way to map from branch name to remote name,
and the way refspecs work makes that hard to get really correct. So if the
user fetches manually, the git-annex branch will get merged, for example.
Anther way of looking at/justifying this is that the setting is called
"annex-pull", not "annex-merge".
This commit was supported by the NSF-funded DataLad project.
2017-04-05 17:04:02 +00:00
|
|
|
|
|
|
|
* `remote.<name>.annex-push`
|
|
|
|
|
git-annex assist
assist: New command, which is the same as git-annex sync but with
new files added and content transferred by default.
(Also this fixes another reversion in git-annex sync,
--commit --no-commit, and --message were not enabled, oops.)
See added comment for why git-annex assist does commit staged
changes elsewhere in the work tree, but only adds files under
the cwd.
Note that it does not support --no-commit, --no-push, --no-pull
like sync does. My thinking is, why should it? If you want that
level of control, use git commit, git annex push, git annex pull.
Sync only got those options because pull and push were not split
out.
Sponsored-by: k0ld on Patreon
2023-05-18 18:37:29 +00:00
|
|
|
If set to `false`, prevents `git-annex push`, `git-annex sync`,
|
|
|
|
`git-annex assist` and the `git-annex assistant` from ever pushing
|
|
|
|
to the remote.
|
2012-10-11 22:39:21 +00:00
|
|
|
|
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.
|
git-annex assist
assist: New command, which is the same as git-annex sync but with
new files added and content transferred by default.
(Also this fixes another reversion in git-annex sync,
--commit --no-commit, and --message were not enabled, oops.)
See added comment for why git-annex assist does commit staged
changes elsewhere in the work tree, but only adds files under
the cwd.
Note that it does not support --no-commit, --no-push, --no-pull
like sync does. My thinking is, why should it? If you want that
level of control, use git commit, git annex push, git annex pull.
Sync only got those options because pull and push were not split
out.
Sponsored-by: k0ld on Patreon
2023-05-18 18:37:29 +00:00
|
|
|
This prevents `git-annex sync` and `git-annex assist` from pushing
|
|
|
|
changes to a git repository. And it prevents storing or removing
|
|
|
|
files from read-only remote.
|
2014-01-02 17:12:32 +00:00
|
|
|
|
Do verification of checksums of annex objects downloaded from remotes.
* When annex objects are received into git repositories, their checksums are
verified then too.
* To get the old, faster, behavior of not verifying checksums, set
annex.verify=false, or remote.<name>.annex-verify=false.
* setkey, rekey: These commands also now verify that the provided file
matches the key, unless annex.verify=false.
* reinject: Already verified content; this can now be disabled by
setting annex.verify=false.
recvkey and reinject already did verification, so removed now duplicate
code from them. fsck still does its own verification, which is ok since it
does not use getViaTmp, so verification doesn't happen twice when using fsck
--from.
2015-10-01 19:54:37 +00:00
|
|
|
* `remote.<name>.annex-verify`, `annex.verify`
|
|
|
|
|
|
|
|
By default, git-annex will verify the checksums of objects downloaded
|
|
|
|
from remotes. If you trust a remote and don't want the overhead
|
|
|
|
of these checksums, you can set this to `false`.
|
|
|
|
|
2018-03-13 18:50:49 +00:00
|
|
|
Note that even when this is set to `false`, git-annex does verification
|
|
|
|
in some edge cases, where it's likely the case than an
|
2018-06-21 17:34:11 +00:00
|
|
|
object was downloaded incorrectly, or when needed for security.
|
2018-03-13 18:50:49 +00:00
|
|
|
|
2019-02-23 19:46:03 +00:00
|
|
|
* `remote.<name>.annex-tracking-branch`
|
|
|
|
|
2019-03-09 17:10:30 +00:00
|
|
|
This is for use with special remotes that support exports and imports.
|
|
|
|
|
2019-02-23 19:46:03 +00:00
|
|
|
When set to eg, "master", this tells git-annex that you want the
|
|
|
|
special remote to track that branch.
|
|
|
|
|
|
|
|
When set to eg, "master:subdir", the special remote tracks only
|
|
|
|
the subdirectory of that branch.
|
|
|
|
|
2023-09-22 16:48:35 +00:00
|
|
|
Setting this enables some other commands to work with these special
|
git-annex assist
assist: New command, which is the same as git-annex sync but with
new files added and content transferred by default.
(Also this fixes another reversion in git-annex sync,
--commit --no-commit, and --message were not enabled, oops.)
See added comment for why git-annex assist does commit staged
changes elsewhere in the work tree, but only adds files under
the cwd.
Note that it does not support --no-commit, --no-push, --no-pull
like sync does. My thinking is, why should it? If you want that
level of control, use git commit, git annex push, git annex pull.
Sync only got those options because pull and push were not split
out.
Sponsored-by: k0ld on Patreon
2023-05-18 18:37:29 +00:00
|
|
|
remotes: `git-annex pull` will import changes from the remote and merge them into
|
|
|
|
the annex-tracking-branch. And `git-annex push` will export changes to
|
|
|
|
the remote. Higher-level commands `git-annex sync --content`
|
|
|
|
and `git-annex assist` both import and export.
|
2019-02-23 19:46:03 +00:00
|
|
|
|
2017-09-19 17:05:43 +00:00
|
|
|
* `remote.<name>.annex-export-tracking`
|
|
|
|
|
2019-02-23 19:46:03 +00:00
|
|
|
Deprecated name for `remote.<name>.annex-tracking-branch`. Will still be used
|
|
|
|
if it's configured and `remote.<name>.annex-tracking-branch` is not.
|
2017-09-19 17:05:43 +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
|
|
|
|
2019-10-10 16:12:22 +00:00
|
|
|
* `remote.<name>.annex-config-uuid`
|
|
|
|
|
|
|
|
Used for some special remotes, points to a different special remote
|
|
|
|
configuration to use.
|
|
|
|
|
2018-03-24 14:37:25 +00:00
|
|
|
* `remote.<name>.annex-retry`, `annex.retry`
|
|
|
|
|
2020-09-04 19:16:40 +00:00
|
|
|
Number of times a transfer that fails can be retried. (default 0)
|
|
|
|
|
|
|
|
* `remote.<name>.annex-forward-retry`, `annex.forward-retry`
|
|
|
|
|
|
|
|
If a transfer made some forward progress before failing,
|
|
|
|
this allows it to be retried even when `annex.retry` does not.
|
|
|
|
The value is the maximum number of times to do that. (default 5)
|
|
|
|
|
|
|
|
When both `annex.retry` and this are set, the maximum number of
|
|
|
|
retries is the larger of the two.
|
2018-03-24 14:37:25 +00:00
|
|
|
|
|
|
|
* `remote.<name>.annex-retry-delay`, `annex.retry-delay`
|
|
|
|
|
|
|
|
Number of seconds to delay before the first retry of a transfer.
|
|
|
|
When making multiple retries of the same transfer, the delay
|
|
|
|
doubles after each retry. (default 1)
|
|
|
|
|
bwlimit
Added annex.bwlimit and remote.name.annex-bwlimit config that works for git
remotes and many but not all special remotes.
This nearly works, at least for a git remote on the same disk. With it set
to 100kb/1s, the meter displays an actual bandwidth of 128 kb/s, with
occasional spikes to 160 kb/s. So it needs to delay just a bit longer...
I'm unsure why.
However, at the beginning a lot of data flows before it determines the
right bandwidth limit. A granularity of less than 1s would probably improve
that.
And, I don't know yet if it makes sense to have it be 100ks/1s rather than
100kb/s. Is there a situation where the user would want a larger
granularity? Does granulatity need to be configurable at all? I only used that
format for the config really in order to reuse an existing parser.
This can't support for external special remotes, or for ones that
themselves shell out to an external command. (Well, it could, but it
would involve pausing and resuming the child process tree, which seems
very hard to implement and very strange besides.) There could also be some
built-in special remotes that it still doesn't work for, due to them not
having a progress meter whose displays blocks the bandwidth using thread.
But I don't think there are actually any that run a separate thread for
downloads than the thread that displays the progress meter.
Sponsored-by: Graham Spencer on Patreon
2021-09-21 20:58:02 +00:00
|
|
|
* `remote.<name>.annex-bwlimit`, `annex.bwlimit`
|
|
|
|
|
|
|
|
This can be used to limit how much bandwidth is used for a transfer
|
|
|
|
from or to a remote.
|
|
|
|
|
2021-09-22 19:14:28 +00:00
|
|
|
For example, to limit transfers to 1 mebibyte per second:
|
|
|
|
`git config annex.bwlimit "1MiB"`
|
|
|
|
|
bwlimit
Added annex.bwlimit and remote.name.annex-bwlimit config that works for git
remotes and many but not all special remotes.
This nearly works, at least for a git remote on the same disk. With it set
to 100kb/1s, the meter displays an actual bandwidth of 128 kb/s, with
occasional spikes to 160 kb/s. So it needs to delay just a bit longer...
I'm unsure why.
However, at the beginning a lot of data flows before it determines the
right bandwidth limit. A granularity of less than 1s would probably improve
that.
And, I don't know yet if it makes sense to have it be 100ks/1s rather than
100kb/s. Is there a situation where the user would want a larger
granularity? Does granulatity need to be configurable at all? I only used that
format for the config really in order to reuse an existing parser.
This can't support for external special remotes, or for ones that
themselves shell out to an external command. (Well, it could, but it
would involve pausing and resuming the child process tree, which seems
very hard to implement and very strange besides.) There could also be some
built-in special remotes that it still doesn't work for, due to them not
having a progress meter whose displays blocks the bandwidth using thread.
But I don't think there are actually any that run a separate thread for
downloads than the thread that displays the progress meter.
Sponsored-by: Graham Spencer on Patreon
2021-09-21 20:58:02 +00:00
|
|
|
This will work with many remotes, including git remotes, but not
|
|
|
|
for remotes where the transfer is run by a separate program than
|
2021-09-22 19:14:28 +00:00
|
|
|
git-annex.
|
bwlimit
Added annex.bwlimit and remote.name.annex-bwlimit config that works for git
remotes and many but not all special remotes.
This nearly works, at least for a git remote on the same disk. With it set
to 100kb/1s, the meter displays an actual bandwidth of 128 kb/s, with
occasional spikes to 160 kb/s. So it needs to delay just a bit longer...
I'm unsure why.
However, at the beginning a lot of data flows before it determines the
right bandwidth limit. A granularity of less than 1s would probably improve
that.
And, I don't know yet if it makes sense to have it be 100ks/1s rather than
100kb/s. Is there a situation where the user would want a larger
granularity? Does granulatity need to be configurable at all? I only used that
format for the config really in order to reuse an existing parser.
This can't support for external special remotes, or for ones that
themselves shell out to an external command. (Well, it could, but it
would involve pausing and resuming the child process tree, which seems
very hard to implement and very strange besides.) There could also be some
built-in special remotes that it still doesn't work for, due to them not
having a progress meter whose displays blocks the bandwidth using thread.
But I don't think there are actually any that run a separate thread for
downloads than the thread that displays the progress meter.
Sponsored-by: Graham Spencer on Patreon
2021-09-21 20:58:02 +00:00
|
|
|
|
2020-12-07 20:55:07 +00:00
|
|
|
* `remote.<name>.annex-stalldetecton`, `annex.stalldetection`
|
|
|
|
|
2021-02-03 19:35:32 +00:00
|
|
|
Configuring this lets stalled or too-slow transfers be detected, and
|
|
|
|
dealt with, so rather than getting stuck, git-annex will cancel the
|
|
|
|
stalled operation. The transfer will be considered to have failed, so
|
2020-12-07 20:55:07 +00:00
|
|
|
settings like annex.retry will control what it does next.
|
|
|
|
|
2021-02-03 19:35:32 +00:00
|
|
|
By default, git-annex detects transfers that have probably stalled,
|
|
|
|
and suggests configuring this. If it is incorrectly detecting
|
|
|
|
stalls, setting this to "false" will avoid that.
|
|
|
|
|
|
|
|
Set to "true" to enable automatic stall detection. If a remote does not
|
|
|
|
update its progress consistently, no automatic stall detection will be
|
|
|
|
done. And it may take a while for git-annex to decide a remote is really
|
|
|
|
stalled when using automatic stall detection, since it needs to be
|
|
|
|
conservative about what looks like a stall.
|
2021-02-03 17:19:47 +00:00
|
|
|
|
|
|
|
For more fine control over what constitutes a stall, set to a value in
|
|
|
|
the form "$amount/$timeperiod" to specify how much data git-annex should
|
|
|
|
expect to see flowing, minimum, over a given period of time.
|
2020-12-07 20:55:07 +00:00
|
|
|
|
|
|
|
For example, to detect outright stalls where no data has been transferred
|
2021-02-03 17:19:47 +00:00
|
|
|
after 30 seconds: `git config annex.stalldetection "1KB/30s"`
|
2020-12-07 20:55:07 +00:00
|
|
|
|
|
|
|
Or, if you have a remote on a USB drive that is normally capable of
|
|
|
|
several megabytes per second, but has bad sectors where it gets
|
|
|
|
stuck for a long time, you could use:
|
|
|
|
`git config remote.usbdrive.annex-stalldetection "1MB/1m"`
|
|
|
|
|
2020-12-10 15:25:02 +00:00
|
|
|
This is not enabled by default, because it can make git-annex use
|
|
|
|
more resources. To be able to cancel stalls, git-annex has to run
|
|
|
|
transfers in separate processes (one per concurrent job). So it
|
|
|
|
may need to open more connections to a remote than usual, or
|
|
|
|
the communication with those processes may make it a bit slower.
|
|
|
|
|
2018-03-08 16:54:56 +00:00
|
|
|
* `remote.<name>.annex-checkuuid`
|
2018-01-10 18:21:18 +00:00
|
|
|
|
|
|
|
This only affects remotes that have their url pointing to a directory on
|
|
|
|
the same system. git-annex normally checks the uuid of such
|
|
|
|
remotes each time it's run, which lets it transparently deal with
|
|
|
|
different drives being mounted to the location at different times.
|
|
|
|
|
|
|
|
Setting annex-checkuuid to false will prevent it from checking the uuid
|
|
|
|
at startup (although the uuid is still verified before making any
|
|
|
|
changes to the remote repository). This may be useful to set to prevent
|
2022-08-19 21:45:04 +00:00
|
|
|
unnecessary spin-up or automounting of a drive.
|
2018-01-10 18:21:18 +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
|
|
|
|
2023-08-16 18:31:31 +00:00
|
|
|
This configuration setting is no longer used.
|
2014-01-13 18:41:10 +00:00
|
|
|
|
2018-08-01 18:22:52 +00:00
|
|
|
* `remote.<name>.annex-speculate-present`
|
|
|
|
|
2018-09-12 19:31:03 +00:00
|
|
|
Set to "true" to make git-annex speculate that this remote may contain the
|
|
|
|
content of any file, even though its normal location tracking does not
|
|
|
|
indicate that it does. This will cause git-annex to try to get all file
|
|
|
|
contents from the remote. Can be useful in setting up a caching remote.
|
2018-08-01 18:22:52 +00:00
|
|
|
|
2021-04-21 21:01:03 +00:00
|
|
|
* `remote.<name>.annex-private`
|
|
|
|
|
|
|
|
When this is set to true, no information about the remote will be
|
|
|
|
recorded in the git-annex branch. This is mostly useful for special
|
|
|
|
remotes, and is set when using [[git-annex-initremote]](1) with the
|
|
|
|
`--private` option.
|
|
|
|
|
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
|
2015-07-26 02:21:06 +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
|
|
|
|
2017-05-09 18:02:48 +00:00
|
|
|
Note that git-annex-shell has a whitelist of allowed rsync options,
|
|
|
|
and others will not be be passed to the remote rsync. So using some
|
|
|
|
options may break the communication between the local and remote rsyncs.
|
|
|
|
|
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
|
2014-08-19 05:22:24 +00:00
|
|
|
to 10Kbyte/s, set `--bwlimit 10`.
|
2014-02-02 20:06:34 +00:00
|
|
|
|
|
|
|
* `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
|
|
|
|
2016-05-10 17:03:56 +00:00
|
|
|
Options to pass to GnuPG when it's encrypting data. For instance, to
|
2013-03-11 01:33:13 +00:00
|
|
|
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.)
|
|
|
|
|
2016-05-10 17:03:56 +00:00
|
|
|
* `remote.<name>.annex-gnupg-decrypt-options`
|
|
|
|
|
|
|
|
Options to pass to GnuPG when it's decrypting data. (These options take
|
|
|
|
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`,
|
2016-05-10 17:03:56 +00:00
|
|
|
`annex.bup-split-options`, `annex.gnupg-options`,
|
|
|
|
`annex.gnupg-decrypt-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
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
* `remote.<name>.annex-rsyncurl`
|
|
|
|
|
|
|
|
Used by rsync special remotes, this configures
|
|
|
|
the location of the rsync repository to use. Normally this is automatically
|
|
|
|
set up by `git annex initremote`, but you can change it if needed.
|
|
|
|
|
|
|
|
* `remote.<name>.annex-buprepo`
|
|
|
|
|
|
|
|
Used by bup special remotes, this configures
|
|
|
|
the location of the bup repository to use. Normally this is automatically
|
|
|
|
set up by `git annex initremote`, but you can change it if needed.
|
|
|
|
|
2020-12-18 20:03:51 +00:00
|
|
|
* `remote.<name>.annex-borgrepo`
|
|
|
|
|
|
|
|
Used by borg special remotes, this configures
|
|
|
|
the location of the borg repository to use. Normally this is automatically
|
|
|
|
set up by `git annex initremote`, but you can change it if needed.
|
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
* `remote.<name>.annex-ddarrepo`
|
|
|
|
|
|
|
|
Used by ddar special remotes, this configures
|
|
|
|
the location of the ddar repository to use. Normally this is automatically
|
|
|
|
set up by `git annex initremote`, but you can change it if needed.
|
|
|
|
|
|
|
|
* `remote.<name>.annex-directory`
|
|
|
|
|
|
|
|
Used by directory special remotes, this configures
|
|
|
|
the location of the directory where annexed files are stored for this
|
|
|
|
remote. Normally this is automatically set up by `git annex initremote`,
|
|
|
|
but you can change it if needed.
|
|
|
|
|
|
|
|
* `remote.<name>.annex-adb`
|
|
|
|
|
|
|
|
Used to identify remotes on Android devices accessed via adb.
|
|
|
|
Normally this is automatically set up by `git annex initremote`.
|
|
|
|
|
|
|
|
* `remote.<name>.annex-androiddirectory`
|
|
|
|
|
|
|
|
Used by adb special remotes, this is the directory on the Android
|
|
|
|
device where files are stored for this remote. Normally this is
|
|
|
|
automatically set up by `git annex initremote`, but you can change
|
|
|
|
it if needed.
|
|
|
|
|
|
|
|
* `remote.<name>.annex-androidserial`
|
|
|
|
|
|
|
|
Used by adb special remotes, this is the serial number of the Android
|
|
|
|
device used by the remote. Normally this is automatically set up by
|
|
|
|
`git annex initremote`, but you can change it if needed, eg when
|
|
|
|
upgrading to a new Android device.
|
|
|
|
|
|
|
|
* `remote.<name>.annex-s3`
|
|
|
|
|
|
|
|
Used to identify Amazon S3 special remotes.
|
|
|
|
Normally this is automatically set up by `git annex initremote`.
|
|
|
|
|
|
|
|
* `remote.<name>.annex-glacier`
|
|
|
|
|
|
|
|
Used to identify Amazon Glacier special remotes.
|
|
|
|
Normally this is automatically set up by `git annex initremote`.
|
|
|
|
|
2023-01-09 19:49:20 +00:00
|
|
|
* `remote.<name>.annex-web`
|
|
|
|
|
|
|
|
Used to identify web special remotes.
|
|
|
|
Normally this is automatically set up by `git annex initremote`.
|
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
* `remote.<name>.annex-webdav`
|
|
|
|
|
|
|
|
Used to identify webdav special remotes.
|
|
|
|
Normally this is automatically set up by `git annex initremote`.
|
|
|
|
|
|
|
|
* `remote.<name>.annex-tahoe`
|
|
|
|
|
|
|
|
Used to identify tahoe special remotes.
|
|
|
|
Points to the configuration directory for tahoe.
|
|
|
|
|
|
|
|
* `remote.<name>.annex-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
|
|
|
|
available to manage it, it's set to "shell".
|
|
|
|
|
|
|
|
* `remote.<name>.annex-git-lfs`
|
|
|
|
|
|
|
|
Used to identify git-lfs special remotes.
|
|
|
|
Normally this is automatically set up by `git annex initremote`.
|
|
|
|
|
|
|
|
It is set to "true" if this is a git-lfs remote.
|
|
|
|
|
2020-09-02 14:41:27 +00:00
|
|
|
* `remote.<name>.annex-httpalso`
|
2020-09-01 19:16:35 +00:00
|
|
|
|
2020-09-02 14:41:27 +00:00
|
|
|
Used to identify httpalso special remotes.
|
2020-09-01 19:16:35 +00:00
|
|
|
Normally this is automatically set up by `git annex initremote`.
|
|
|
|
|
2020-04-23 18:56:03 +00:00
|
|
|
* `remote.<name>.annex-externaltype`
|
2019-09-01 16:56:28 +00:00
|
|
|
|
2020-04-23 18:56:03 +00:00
|
|
|
Used external special remotes to record the type of the remote.
|
|
|
|
|
|
|
|
Eg, if this is set to "foo", git-annex will run a "git-annex-remote-foo"
|
|
|
|
program to communicate with the external special remote.
|
|
|
|
|
|
|
|
If this is set to "readonly", then git-annex will not run any external
|
|
|
|
special remote program, but will try to access things stored in the
|
|
|
|
remote using http. That only works for some external special remotes,
|
|
|
|
so consult the documentation of the one you are using.
|
|
|
|
|
|
|
|
* `remote.<name>.annex-hooktype`
|
|
|
|
|
|
|
|
Used by hook special remotes to record the type of the remote.
|
2019-09-01 16:56:28 +00:00
|
|
|
|
2012-03-22 03:41:01 +00:00
|
|
|
* `annex.web-options`
|
|
|
|
|
2018-06-17 17:05:30 +00:00
|
|
|
Options to pass to curl when git-annex uses it to download urls
|
2018-04-06 21:00:46 +00:00
|
|
|
(rather than the default built-in url downloader).
|
|
|
|
|
|
|
|
For example, to force IPv4 only, set it to "-4".
|
2012-03-22 03:41:01 +00:00
|
|
|
|
2018-06-17 17:05:30 +00:00
|
|
|
Setting this option makes git-annex use curl, but only
|
2019-05-30 16:43:40 +00:00
|
|
|
when annex.security.allowed-ip-addresses is configured in a
|
2018-06-17 17:05:30 +00:00
|
|
|
specific way. See its documentation.
|
|
|
|
|
2022-09-09 20:06:47 +00:00
|
|
|
Setting this option prevents git-annex from using git-credential
|
|
|
|
for prompting for http passwords. Instead, you can include "--netrc"
|
|
|
|
to make curl use your ~/.netrc file and record the passwords there.
|
|
|
|
|
2017-11-28 18:05:58 +00:00
|
|
|
* `annex.youtube-dl-options`
|
2013-08-22 22:25:21 +00:00
|
|
|
|
default to yt-dlp and fix progress parsing bugs
I noticed git-annex was using a lot of CPU when downloading from youtube,
and was not displaying progress. Turns out that yt-dlp (and I think also
youtube-dl) sometimes only knows an estimated size, not the actual size,
and displays the progress output slightly differently for that. That broke
the parser. And, the parser was feeding chunks that failed to parse back
as a remainder, which caused it to try to re-parse the entire output each
time, so it got slower and slower.
Using --progress-template like this should avoid parsing problems as well
as future proof against output changes. But it will work with only yt-dlp.
So, this seemed like the right time to deprecate youtube-dl, and default
to yt-dlp when available.
git-annex will still use youtube-dl if that's all that's available.
However, since the progress parser for youtube-dl was buggy, and I don't
want to maintain two different progress parsers (especially since
youtube-dl is no longer in debian unstable having been replaced by
yt-dlp), made git-annex no longer try to parse youtube-dl's progress.
Also, updated docs for yt-dlp being default. It did not seem worth
renaming annex.youtube-dl-options and annex.youtube-dl-command.
Note that yt-dlp does not seem to document the fields available in the
progress template. I found them by reading the source and looking at
the templates it uses internally. Also note that the use of "i" (rather
than "s") in progressTemplate makes it display floats rounded to integers;
particularly the estimated total size can be a float. That also does not
seem to be documented but I assume is a python thing?
Sponsored-by: Joshua Antonishen on Patreon
2023-05-27 16:45:16 +00:00
|
|
|
Options to pass to yt-dlp (or deprecated youtube-dl) when using it to
|
|
|
|
find the url to download for a video.
|
2017-11-28 18:05:58 +00:00
|
|
|
|
default to yt-dlp and fix progress parsing bugs
I noticed git-annex was using a lot of CPU when downloading from youtube,
and was not displaying progress. Turns out that yt-dlp (and I think also
youtube-dl) sometimes only knows an estimated size, not the actual size,
and displays the progress output slightly differently for that. That broke
the parser. And, the parser was feeding chunks that failed to parse back
as a remainder, which caused it to try to re-parse the entire output each
time, so it got slower and slower.
Using --progress-template like this should avoid parsing problems as well
as future proof against output changes. But it will work with only yt-dlp.
So, this seemed like the right time to deprecate youtube-dl, and default
to yt-dlp when available.
git-annex will still use youtube-dl if that's all that's available.
However, since the progress parser for youtube-dl was buggy, and I don't
want to maintain two different progress parsers (especially since
youtube-dl is no longer in debian unstable having been replaced by
yt-dlp), made git-annex no longer try to parse youtube-dl's progress.
Also, updated docs for yt-dlp being default. It did not seem worth
renaming annex.youtube-dl-options and annex.youtube-dl-command.
Note that yt-dlp does not seem to document the fields available in the
progress template. I found them by reading the source and looking at
the templates it uses internally. Also note that the use of "i" (rather
than "s") in progressTemplate makes it display floats rounded to integers;
particularly the estimated total size can be a float. That also does not
seem to be documented but I assume is a python thing?
Sponsored-by: Joshua Antonishen on Patreon
2023-05-27 16:45:16 +00:00
|
|
|
Some options may break git-annex's integration with yt-dlp. For
|
2017-11-28 18:05:58 +00:00
|
|
|
example, the --output option could cause it to store files somewhere
|
default to yt-dlp and fix progress parsing bugs
I noticed git-annex was using a lot of CPU when downloading from youtube,
and was not displaying progress. Turns out that yt-dlp (and I think also
youtube-dl) sometimes only knows an estimated size, not the actual size,
and displays the progress output slightly differently for that. That broke
the parser. And, the parser was feeding chunks that failed to parse back
as a remainder, which caused it to try to re-parse the entire output each
time, so it got slower and slower.
Using --progress-template like this should avoid parsing problems as well
as future proof against output changes. But it will work with only yt-dlp.
So, this seemed like the right time to deprecate youtube-dl, and default
to yt-dlp when available.
git-annex will still use youtube-dl if that's all that's available.
However, since the progress parser for youtube-dl was buggy, and I don't
want to maintain two different progress parsers (especially since
youtube-dl is no longer in debian unstable having been replaced by
yt-dlp), made git-annex no longer try to parse youtube-dl's progress.
Also, updated docs for yt-dlp being default. It did not seem worth
renaming annex.youtube-dl-options and annex.youtube-dl-command.
Note that yt-dlp does not seem to document the fields available in the
progress template. I found them by reading the source and looking at
the templates it uses internally. Also note that the use of "i" (rather
than "s") in progressTemplate makes it display floats rounded to integers;
particularly the estimated total size can be a float. That also does not
seem to be documented but I assume is a python thing?
Sponsored-by: Joshua Antonishen on Patreon
2023-05-27 16:45:16 +00:00
|
|
|
git-annex won't find them. Avoid setting here or in the yt-dlp config
|
|
|
|
file any options that cause it to download more than one file,
|
2017-11-30 00:07:03 +00:00
|
|
|
or to store the file anywhere other than the current working directory.
|
2013-08-22 22:25:21 +00:00
|
|
|
|
2021-08-27 13:44:23 +00:00
|
|
|
* `annex.youtube-dl-command`
|
|
|
|
|
default to yt-dlp and fix progress parsing bugs
I noticed git-annex was using a lot of CPU when downloading from youtube,
and was not displaying progress. Turns out that yt-dlp (and I think also
youtube-dl) sometimes only knows an estimated size, not the actual size,
and displays the progress output slightly differently for that. That broke
the parser. And, the parser was feeding chunks that failed to parse back
as a remainder, which caused it to try to re-parse the entire output each
time, so it got slower and slower.
Using --progress-template like this should avoid parsing problems as well
as future proof against output changes. But it will work with only yt-dlp.
So, this seemed like the right time to deprecate youtube-dl, and default
to yt-dlp when available.
git-annex will still use youtube-dl if that's all that's available.
However, since the progress parser for youtube-dl was buggy, and I don't
want to maintain two different progress parsers (especially since
youtube-dl is no longer in debian unstable having been replaced by
yt-dlp), made git-annex no longer try to parse youtube-dl's progress.
Also, updated docs for yt-dlp being default. It did not seem worth
renaming annex.youtube-dl-options and annex.youtube-dl-command.
Note that yt-dlp does not seem to document the fields available in the
progress template. I found them by reading the source and looking at
the templates it uses internally. Also note that the use of "i" (rather
than "s") in progressTemplate makes it display floats rounded to integers;
particularly the estimated total size can be a float. That also does not
seem to be documented but I assume is a python thing?
Sponsored-by: Joshua Antonishen on Patreon
2023-05-27 16:45:16 +00:00
|
|
|
Default is to use "yt-dlp" or if that is not available in the PATH,
|
|
|
|
to use "youtube-dl".
|
2021-08-27 13:44:23 +00:00
|
|
|
|
2014-12-17 03:22:46 +00:00
|
|
|
* `annex.aria-torrent-options`
|
|
|
|
|
|
|
|
Options to pass to aria2c when using it to download a torrent.
|
|
|
|
|
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.
|
|
|
|
|
limit url downloads to whitelisted schemes
Security fix! Allowing any schemes, particularly file: and
possibly others like scp: allowed file exfiltration by anyone who had
write access to the git repository, since they could add an annexed file
using such an url, or using an url that redirected to such an url,
and wait for the victim to get it into their repository and send them a copy.
* Added annex.security.allowed-url-schemes setting, which defaults
to only allowing http and https URLs. Note especially that file:/
is no longer enabled by default.
* Removed annex.web-download-command, since its interface does not allow
supporting annex.security.allowed-url-schemes across redirects.
If you used this setting, you may want to instead use annex.web-options
to pass options to curl.
With annex.web-download-command removed, nearly all url accesses in
git-annex are made via Utility.Url via http-client or curl. http-client
only supports http and https, so no problem there.
(Disabling one and not the other is not implemented.)
Used curl --proto to limit the allowed url schemes.
Note that this will cause git annex fsck --from web to mark files using
a disallowed url scheme as not being present in the web. That seems
acceptable; fsck --from web also does that when a web server is not available.
youtube-dl already disabled file: itself (probably for similar
reasons). The scheme check was also added to youtube-dl urls for
completeness, although that check won't catch any redirects it might
follow. But youtube-dl goes off and does its own thing with other
protocols anyway, so that's fine.
Special remotes that support other domain-specific url schemes are not
affected by this change. In the bittorrent remote, aria2c can still
download magnet: links. The download of the .torrent file is
otherwise now limited by annex.security.allowed-url-schemes.
This does not address any external special remotes that might download
an url themselves. Current thinking is all external special remotes will
need to be audited for this problem, although many of them will use
http libraries that only support http and not curl's menagarie.
The related problem of accessing private localhost and LAN urls is not
addressed by this commit.
This commit was sponsored by Brett Eisenberg on Patreon.
2018-06-15 20:52:24 +00:00
|
|
|
* `annex.security.allowed-url-schemes`
|
2013-04-09 03:34:05 +00:00
|
|
|
|
limit url downloads to whitelisted schemes
Security fix! Allowing any schemes, particularly file: and
possibly others like scp: allowed file exfiltration by anyone who had
write access to the git repository, since they could add an annexed file
using such an url, or using an url that redirected to such an url,
and wait for the victim to get it into their repository and send them a copy.
* Added annex.security.allowed-url-schemes setting, which defaults
to only allowing http and https URLs. Note especially that file:/
is no longer enabled by default.
* Removed annex.web-download-command, since its interface does not allow
supporting annex.security.allowed-url-schemes across redirects.
If you used this setting, you may want to instead use annex.web-options
to pass options to curl.
With annex.web-download-command removed, nearly all url accesses in
git-annex are made via Utility.Url via http-client or curl. http-client
only supports http and https, so no problem there.
(Disabling one and not the other is not implemented.)
Used curl --proto to limit the allowed url schemes.
Note that this will cause git annex fsck --from web to mark files using
a disallowed url scheme as not being present in the web. That seems
acceptable; fsck --from web also does that when a web server is not available.
youtube-dl already disabled file: itself (probably for similar
reasons). The scheme check was also added to youtube-dl urls for
completeness, although that check won't catch any redirects it might
follow. But youtube-dl goes off and does its own thing with other
protocols anyway, so that's fine.
Special remotes that support other domain-specific url schemes are not
affected by this change. In the bittorrent remote, aria2c can still
download magnet: links. The download of the .torrent file is
otherwise now limited by annex.security.allowed-url-schemes.
This does not address any external special remotes that might download
an url themselves. Current thinking is all external special remotes will
need to be audited for this problem, although many of them will use
http libraries that only support http and not curl's menagarie.
The related problem of accessing private localhost and LAN urls is not
addressed by this commit.
This commit was sponsored by Brett Eisenberg on Patreon.
2018-06-15 20:52:24 +00:00
|
|
|
List of URL schemes that git-annex is allowed to download content from.
|
2018-06-18 19:36:12 +00:00
|
|
|
The default is "http https ftp".
|
2013-04-09 03:34:05 +00:00
|
|
|
|
limit url downloads to whitelisted schemes
Security fix! Allowing any schemes, particularly file: and
possibly others like scp: allowed file exfiltration by anyone who had
write access to the git repository, since they could add an annexed file
using such an url, or using an url that redirected to such an url,
and wait for the victim to get it into their repository and send them a copy.
* Added annex.security.allowed-url-schemes setting, which defaults
to only allowing http and https URLs. Note especially that file:/
is no longer enabled by default.
* Removed annex.web-download-command, since its interface does not allow
supporting annex.security.allowed-url-schemes across redirects.
If you used this setting, you may want to instead use annex.web-options
to pass options to curl.
With annex.web-download-command removed, nearly all url accesses in
git-annex are made via Utility.Url via http-client or curl. http-client
only supports http and https, so no problem there.
(Disabling one and not the other is not implemented.)
Used curl --proto to limit the allowed url schemes.
Note that this will cause git annex fsck --from web to mark files using
a disallowed url scheme as not being present in the web. That seems
acceptable; fsck --from web also does that when a web server is not available.
youtube-dl already disabled file: itself (probably for similar
reasons). The scheme check was also added to youtube-dl urls for
completeness, although that check won't catch any redirects it might
follow. But youtube-dl goes off and does its own thing with other
protocols anyway, so that's fine.
Special remotes that support other domain-specific url schemes are not
affected by this change. In the bittorrent remote, aria2c can still
download magnet: links. The download of the .torrent file is
otherwise now limited by annex.security.allowed-url-schemes.
This does not address any external special remotes that might download
an url themselves. Current thinking is all external special remotes will
need to be audited for this problem, although many of them will use
http libraries that only support http and not curl's menagarie.
The related problem of accessing private localhost and LAN urls is not
addressed by this commit.
This commit was sponsored by Brett Eisenberg on Patreon.
2018-06-15 20:52:24 +00:00
|
|
|
Think very carefully before changing this; there are security
|
2018-06-17 17:05:30 +00:00
|
|
|
implications. For example, if it's changed to allow "file" URLs, then
|
|
|
|
anyone who can get a commit into your git-annex repository could
|
|
|
|
`git-annex addurl` a pointer to a private file located outside that
|
|
|
|
repository, possibly causing it to be copied into your repository
|
|
|
|
and transferred on to other remotes, exposing its content.
|
limit url downloads to whitelisted schemes
Security fix! Allowing any schemes, particularly file: and
possibly others like scp: allowed file exfiltration by anyone who had
write access to the git repository, since they could add an annexed file
using such an url, or using an url that redirected to such an url,
and wait for the victim to get it into their repository and send them a copy.
* Added annex.security.allowed-url-schemes setting, which defaults
to only allowing http and https URLs. Note especially that file:/
is no longer enabled by default.
* Removed annex.web-download-command, since its interface does not allow
supporting annex.security.allowed-url-schemes across redirects.
If you used this setting, you may want to instead use annex.web-options
to pass options to curl.
With annex.web-download-command removed, nearly all url accesses in
git-annex are made via Utility.Url via http-client or curl. http-client
only supports http and https, so no problem there.
(Disabling one and not the other is not implemented.)
Used curl --proto to limit the allowed url schemes.
Note that this will cause git annex fsck --from web to mark files using
a disallowed url scheme as not being present in the web. That seems
acceptable; fsck --from web also does that when a web server is not available.
youtube-dl already disabled file: itself (probably for similar
reasons). The scheme check was also added to youtube-dl urls for
completeness, although that check won't catch any redirects it might
follow. But youtube-dl goes off and does its own thing with other
protocols anyway, so that's fine.
Special remotes that support other domain-specific url schemes are not
affected by this change. In the bittorrent remote, aria2c can still
download magnet: links. The download of the .torrent file is
otherwise now limited by annex.security.allowed-url-schemes.
This does not address any external special remotes that might download
an url themselves. Current thinking is all external special remotes will
need to be audited for this problem, although many of them will use
http libraries that only support http and not curl's menagarie.
The related problem of accessing private localhost and LAN urls is not
addressed by this commit.
This commit was sponsored by Brett Eisenberg on Patreon.
2018-06-15 20:52:24 +00:00
|
|
|
|
2022-08-15 16:22:01 +00:00
|
|
|
Any url schemes supported by curl can be listed here, but you will
|
2023-08-22 14:25:53 +00:00
|
|
|
also need to configure annex.security.allowed-ip-addresses to allow
|
|
|
|
using curl.
|
2022-08-15 16:22:01 +00:00
|
|
|
|
limit url downloads to whitelisted schemes
Security fix! Allowing any schemes, particularly file: and
possibly others like scp: allowed file exfiltration by anyone who had
write access to the git repository, since they could add an annexed file
using such an url, or using an url that redirected to such an url,
and wait for the victim to get it into their repository and send them a copy.
* Added annex.security.allowed-url-schemes setting, which defaults
to only allowing http and https URLs. Note especially that file:/
is no longer enabled by default.
* Removed annex.web-download-command, since its interface does not allow
supporting annex.security.allowed-url-schemes across redirects.
If you used this setting, you may want to instead use annex.web-options
to pass options to curl.
With annex.web-download-command removed, nearly all url accesses in
git-annex are made via Utility.Url via http-client or curl. http-client
only supports http and https, so no problem there.
(Disabling one and not the other is not implemented.)
Used curl --proto to limit the allowed url schemes.
Note that this will cause git annex fsck --from web to mark files using
a disallowed url scheme as not being present in the web. That seems
acceptable; fsck --from web also does that when a web server is not available.
youtube-dl already disabled file: itself (probably for similar
reasons). The scheme check was also added to youtube-dl urls for
completeness, although that check won't catch any redirects it might
follow. But youtube-dl goes off and does its own thing with other
protocols anyway, so that's fine.
Special remotes that support other domain-specific url schemes are not
affected by this change. In the bittorrent remote, aria2c can still
download magnet: links. The download of the .torrent file is
otherwise now limited by annex.security.allowed-url-schemes.
This does not address any external special remotes that might download
an url themselves. Current thinking is all external special remotes will
need to be audited for this problem, although many of them will use
http libraries that only support http and not curl's menagarie.
The related problem of accessing private localhost and LAN urls is not
addressed by this commit.
This commit was sponsored by Brett Eisenberg on Patreon.
2018-06-15 20:52:24 +00:00
|
|
|
Some special remotes support their own domain-specific URL
|
|
|
|
schemes; those are not affected by this configuration setting.
|
2014-01-24 16:58:52 +00:00
|
|
|
|
2019-05-30 16:43:40 +00:00
|
|
|
* `annex.security.allowed-ip-addresses`
|
2018-06-17 17:05:30 +00:00
|
|
|
|
2019-05-30 16:43:40 +00:00
|
|
|
By default, git-annex only makes connections to public IP addresses;
|
|
|
|
it will refuse to use HTTP and other servers on localhost or on a
|
|
|
|
private network.
|
2018-06-17 17:05:30 +00:00
|
|
|
|
|
|
|
This setting can override that behavior, allowing access to particular
|
2020-02-25 18:34:39 +00:00
|
|
|
IP addresses that would normally be blocked. For example "127.0.0.1 ::1"
|
|
|
|
allows access to localhost (both IPV4 and IPV6).
|
|
|
|
To allow access to all IP addresses, use "all"
|
2018-06-17 17:05:30 +00:00
|
|
|
|
|
|
|
Think very carefully before changing this; there are security
|
|
|
|
implications. Anyone who can get a commit into your git-annex repository
|
2019-05-30 16:43:40 +00:00
|
|
|
could `git annex addurl` an url on a private server, possibly
|
2018-06-18 19:57:13 +00:00
|
|
|
causing it to be downloaded into your repository and transferred to
|
2018-06-17 17:05:30 +00:00
|
|
|
other remotes, exposing its content.
|
|
|
|
|
default to yt-dlp and fix progress parsing bugs
I noticed git-annex was using a lot of CPU when downloading from youtube,
and was not displaying progress. Turns out that yt-dlp (and I think also
youtube-dl) sometimes only knows an estimated size, not the actual size,
and displays the progress output slightly differently for that. That broke
the parser. And, the parser was feeding chunks that failed to parse back
as a remainder, which caused it to try to re-parse the entire output each
time, so it got slower and slower.
Using --progress-template like this should avoid parsing problems as well
as future proof against output changes. But it will work with only yt-dlp.
So, this seemed like the right time to deprecate youtube-dl, and default
to yt-dlp when available.
git-annex will still use youtube-dl if that's all that's available.
However, since the progress parser for youtube-dl was buggy, and I don't
want to maintain two different progress parsers (especially since
youtube-dl is no longer in debian unstable having been replaced by
yt-dlp), made git-annex no longer try to parse youtube-dl's progress.
Also, updated docs for yt-dlp being default. It did not seem worth
renaming annex.youtube-dl-options and annex.youtube-dl-command.
Note that yt-dlp does not seem to document the fields available in the
progress template. I found them by reading the source and looking at
the templates it uses internally. Also note that the use of "i" (rather
than "s") in progressTemplate makes it display floats rounded to integers;
particularly the estimated total size can be a float. That also does not
seem to be documented but I assume is a python thing?
Sponsored-by: Joshua Antonishen on Patreon
2023-05-27 16:45:16 +00:00
|
|
|
Note that, since the interfaces of curl and yt-dlp do not allow
|
|
|
|
these IP address restrictions to be enforced, curl and yt-dlp will
|
2019-05-30 16:43:40 +00:00
|
|
|
never be used unless annex.security.allowed-ip-addresses=all.
|
2020-02-25 19:45:52 +00:00
|
|
|
|
|
|
|
To allow accessing local or private IP addresses on only specific ports,
|
|
|
|
use the syntax "[addr]:port". For example,
|
|
|
|
"[127.0.0.1]:80 [127.0.0.1]:443 [::1]:80 [::1]:443" allows
|
|
|
|
localhost on the http ports only.
|
2019-05-30 16:43:40 +00:00
|
|
|
|
|
|
|
* `annex.security.allowed-http-addresses`
|
|
|
|
|
|
|
|
Old name for annex.security.allowed-ip-addresses.
|
|
|
|
If set, this is treated the same as having
|
|
|
|
annex.security.allowed-ip-addresses set.
|
2018-06-17 17:05:30 +00:00
|
|
|
|
2018-09-25 19:32:50 +00:00
|
|
|
* `annex.security.allow-unverified-downloads`
|
2018-06-21 17:34:11 +00:00
|
|
|
|
|
|
|
For security reasons, git-annex refuses to download content from
|
|
|
|
most special remotes when it cannot check a hash to verify
|
|
|
|
that the correct content was downloaded. This particularly impacts
|
|
|
|
downloading the content of URL or WORM keys, which lack hashes.
|
|
|
|
|
|
|
|
The best way to avoid problems due to this is to migrate files
|
|
|
|
away from such keys, before their content reaches a special remote.
|
|
|
|
See [[git-annex-migrate]](1).
|
|
|
|
|
|
|
|
When the content is only available from a special remote, you can
|
|
|
|
use this configuration to force git-annex to download it.
|
|
|
|
But you do so at your own risk, and it's very important you read and
|
|
|
|
understand the information below first!
|
|
|
|
|
|
|
|
Downloading unverified content from encrypted special remotes is
|
|
|
|
prevented, because the special remote could send some other encrypted
|
|
|
|
content than what you expect, causing git-annex to decrypt data that you
|
|
|
|
never checked into git-annex, and risking exposing the decrypted
|
|
|
|
data to any non-encrypted remotes you send content to.
|
|
|
|
|
|
|
|
Downloading unverified content from (non-encrypted)
|
|
|
|
external special remotes is prevented, because they could follow
|
|
|
|
http redirects to web servers on localhost or on a private network,
|
|
|
|
or in some cases to a file:/// url.
|
|
|
|
|
|
|
|
If you decide to bypass this security check, the best thing to do is
|
|
|
|
to only set it temporarily while running the command that gets the file.
|
|
|
|
The value to set the config to is "ACKTHPPT".
|
|
|
|
For example:
|
|
|
|
|
|
|
|
git -c annex.security.allow-unverified-downloads=ACKTHPPT annex get myfile
|
|
|
|
|
|
|
|
It would be a good idea to check that it downloaded the file you expected,
|
|
|
|
too.
|
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
* `remote.<name>.annex-security-allow-unverified-downloads`
|
2018-09-25 19:32:50 +00:00
|
|
|
|
|
|
|
Per-remote configuration of annex.security.allow-unverified-downloads.
|
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
# CONFIGURATION OF ASSISTANT
|
2011-04-09 19:57:45 +00:00
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
* `annex.delayadd`
|
2018-03-27 16:41:57 +00:00
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
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
|
|
|
|
to close it.
|
2011-04-09 19:57:45 +00:00
|
|
|
|
2021-05-19 15:13:53 +00:00
|
|
|
Note that this only delays adding files created while the daemon is
|
2021-07-13 16:15:40 +00:00
|
|
|
running. Changes made when it is not running will be added immediately
|
|
|
|
the next time it is started up.
|
2021-05-19 15:13:53 +00:00
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
* `annex.expireunused`
|
2011-03-28 06:12:05 +00:00
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
Controls what the assistant does about unused file contents
|
|
|
|
that are stored in the repository.
|
2012-11-20 20:43:58 +00:00
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
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).
|
2012-11-20 20:43:58 +00:00
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
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.
|
2012-11-15 19:42:07 +00:00
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
* `annex.fscknudge`
|
2012-11-15 19:42:07 +00:00
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
When set to false, prevents the webapp from reminding you when using
|
|
|
|
repositories that lack consistency checks.
|
2014-01-08 20:14:37 +00:00
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
* `annex.autoupgrade`
|
2014-01-08 20:14:37 +00:00
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
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.
|
2013-09-24 21:25:47 +00:00
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
Note that upgrade checking is only done when git-annex is installed
|
|
|
|
from one of the prebuilt images from its website. This does not
|
|
|
|
bypass e.g., a Linux distribution's own upgrade handling code.
|
2013-09-24 21:25:47 +00:00
|
|
|
|
2019-09-01 16:56:28 +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-09-24 21:25:47 +00:00
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
* `annex.autocommit`
|
2019-08-01 19:11:45 +00:00
|
|
|
|
git-annex assist
assist: New command, which is the same as git-annex sync but with
new files added and content transferred by default.
(Also this fixes another reversion in git-annex sync,
--commit --no-commit, and --message were not enabled, oops.)
See added comment for why git-annex assist does commit staged
changes elsewhere in the work tree, but only adds files under
the cwd.
Note that it does not support --no-commit, --no-push, --no-pull
like sync does. My thinking is, why should it? If you want that
level of control, use git commit, git annex push, git annex pull.
Sync only got those options because pull and push were not split
out.
Sponsored-by: k0ld on Patreon
2023-05-18 18:37:29 +00:00
|
|
|
Set to false to prevent the `git-annex assistant`, `git-annex assist`,
|
|
|
|
and `git-annex sync` from automatically committing changes to files in
|
|
|
|
the repository.
|
2019-08-01 19:11:45 +00:00
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
To configure the behavior in all clones of the repository,
|
2019-09-18 16:34:40 +00:00
|
|
|
this can be set in [[git-annex-config]](1).
|
2019-08-01 19:11:45 +00:00
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
* `annex.startupscan`
|
2013-12-29 17:41:53 +00:00
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
Set to false to prevent the git-annex assistant from scanning the
|
|
|
|
repository for new and changed files on startup. This will prevent it
|
|
|
|
from noticing changes that were made while it was not running, but can be
|
|
|
|
a useful performance tweak for a large repository.
|
2013-12-29 17:41:53 +00:00
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
* `annex.listen`
|
2015-01-27 21:38:06 +00:00
|
|
|
|
2019-09-01 16:56:28 +00:00
|
|
|
Configures which address the webapp listens on. The default is localhost.
|
|
|
|
Can be either an IP address, or a hostname that resolves to the desired
|
|
|
|
address.
|
2015-01-27 21:38:06 +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
|
2022-09-26 19:59:10 +00:00
|
|
|
use. (See [[git-annex-backends]](1) for information about
|
|
|
|
available backends.)
|
|
|
|
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
|
|
|
|
2019-10-24 17:50:44 +00:00
|
|
|
There is a annex.largefiles attribute, which is used to configure which
|
git-annex config annex.largefiles
annex.largefiles can be configured by git-annex config, to more easily set
a default that will also be used by clones, without needing to shoehorn the
expression into the gitattributes file. The git config and gitattributes
override that.
Whenever something is added to git-annex config, we have to consider what
happens if a user puts a purposfully bad value in there. Or, if a new
git-annex adds some new value that an old git-annex can't parse.
In this case, a global annex.largefiles that can't be parsed currently
makes an error be thrown. That might not be ideal, but the gitattribute
behaves the same, and is almost equally repo-global.
Performance notes:
git-annex add and addurl construct a matcher once
and uses it for every file, so the added time penalty for reading the global
config log is minor. If the gitattributes annex.largefiles were deprecated,
git-annex add would get around 2% faster (excluding hashing), because
looking that up for each file is not fast. So this new way of setting
it is progress toward speeding up add.
git-annex smudge does need to load the log every time. As well as checking
the git attribute. Not ideal. Setting annex.gitaddtoannex=false avoids
both overheads.
2019-12-20 16:12:31 +00:00
|
|
|
files are large enough to be added to the annex. Since attributes cannot
|
|
|
|
contain spaces, it is difficult to use for more complex annex.largefiles
|
|
|
|
settings. Setting annex.largefiles in [[git-annex-config]](1) is an easier
|
2019-12-20 19:01:34 +00:00
|
|
|
way to configure it across all clones of the repository.
|
|
|
|
See [[git-annex-matching-expression]](1) for details on the syntax.
|
2016-02-02 19:18:17 +00:00
|
|
|
|
2021-01-06 18:11:08 +00:00
|
|
|
The numcopies and mincopies settings can also be configured on a
|
|
|
|
per-file-type basis via the `annex.numcopies` and `annex.mincopies`
|
|
|
|
attributes in `.gitattributes` files. This overrides other settings.
|
2014-01-20 20:47:56 +00:00
|
|
|
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
|
|
|
|
2014-02-20 18:45:17 +00:00
|
|
|
These settings are honored by git-annex whenever it's operating on a
|
|
|
|
matching file. However, when using --all, --unused, or --key to specify
|
|
|
|
keys to operate on, git-annex is operating on keys and not files, so will
|
2016-02-02 19:18:17 +00:00
|
|
|
not honor the settings from .gitattributes. For this reason, the `git annex
|
2021-01-06 18:11:08 +00:00
|
|
|
numcopies` and `git annex mincopies` commands are useful to configure a
|
|
|
|
global default.
|
2014-02-20 18:45:17 +00:00
|
|
|
|
|
|
|
Also note that when using views, only the toplevel .gitattributes file is
|
|
|
|
preserved in the view, so other settings in other files won't have any
|
2014-08-19 05:22:24 +00:00
|
|
|
effect.
|
2014-02-20 18:45:17 +00:00
|
|
|
|
2015-06-23 16:56:03 +00:00
|
|
|
# EXIT STATUS
|
|
|
|
|
2022-02-28 17:26:26 +00:00
|
|
|
git-annex itself will exit 0 on success and 1 on failure, unless
|
|
|
|
the `--size-limit` or `--time-limit` option is hit, in
|
|
|
|
which case it exits 101.
|
|
|
|
|
|
|
|
A few git-annex subcommands have other exit statuses used to indicate
|
|
|
|
specific problems, which are documented on their individual man pages.
|
2015-06-23 16:56:03 +00:00
|
|
|
|
2017-03-17 20:02:47 +00:00
|
|
|
# ENVIRONMENT
|
|
|
|
|
|
|
|
These environment variables are used by git-annex when set:
|
|
|
|
|
|
|
|
* `GIT_WORK_TREE`, `GIT_DIR`
|
|
|
|
|
|
|
|
Handled the same as they are by git, see git(1)
|
|
|
|
|
|
|
|
* `GIT_SSH`, `GIT_SSH_COMMAND`
|
|
|
|
|
|
|
|
Handled similarly to the same as described in git(1).
|
|
|
|
The one difference is that git-annex will sometimes pass an additional
|
|
|
|
"-n" parameter to these, as the first parameter, to prevent ssh from
|
2017-04-07 15:35:20 +00:00
|
|
|
reading from stdin. Since that can break existing uses of these
|
|
|
|
environment variables that don't expect the extra parameter, you will
|
|
|
|
need to set `GIT_ANNEX_USE_GIT_SSH=1` to make git-annex support
|
|
|
|
these.
|
2017-03-17 20:02:47 +00:00
|
|
|
|
|
|
|
Note that setting either of these environment variables prevents
|
|
|
|
git-annex from automatically enabling ssh connection caching
|
|
|
|
(see `annex.sshcaching`), so it will slow down some operations with
|
|
|
|
remotes over ssh. It's up to you to enable ssh connection caching
|
|
|
|
if you need it; see ssh's documentation.
|
|
|
|
|
|
|
|
Also, `annex.ssh-options` and `remote.<name>.annex-ssh-options`
|
|
|
|
won't have any effect when these envionment variables are set.
|
|
|
|
|
|
|
|
Usually it's better to configure any desired options through your
|
|
|
|
~/.ssh/config file, or by setting `annex.ssh-options`.
|
|
|
|
|
2017-08-14 17:55:38 +00:00
|
|
|
* `GIT_ANNEX_VECTOR_CLOCK`
|
|
|
|
|
|
|
|
Normally git-annex timestamps lines in the log files committed to the
|
|
|
|
git-annex branch. Setting this environment variable to a number
|
deal better with clock skew situations, using vector clocks
* Deal with clock skew, both forwards and backwards, when logging
information to the git-annex branch.
* GIT_ANNEX_VECTOR_CLOCK can now be set to a fixed value (eg 1)
rather than needing to be advanced each time a new change is made.
* Misuse of GIT_ANNEX_VECTOR_CLOCK will no longer confuse git-annex.
When changing a file in the git-annex branch, the vector clock to use is now
determined by first looking at the current time (or GIT_ANNEX_VECTOR_CLOCK
when set), and comparing it to the newest vector clock already in use in
that file. If a newer time stamp was already in use, advance it forward by
a second instead.
When the clock is set to a time in the past, this avoids logging with
an old timestamp, which would risk that log line later being ignored in favor
of "newer" line that is really not newer.
When a log entry has been made with a clock that was set far ahead in the
future, this avoids newer information being logged with an older timestamp
and so being ignored in favor of that future-timestamped information.
Once all clocks get fixed, this will result in the vector clocks being
incremented, until finally enough time has passed that time gets back ahead
of the vector clock value, and then it will return to usual operation.
(This latter situation is not ideal, but it seems the best that can be done.
The issue with it is, since all writers will be incrementing the last
vector clock they saw, there's no way to tell when one writer made a write
significantly later in time than another, so the earlier write might
arbitrarily be picked when merging. This problem is why git-annex uses
timestamps in the first place, rather than pure vector clocks.)
Advancing forward by 1 second is somewhat arbitrary. setDead
advances a timestamp by just 1 picosecond, and the vector clock could
too. But then it would interfere with setDead, which wants to be
overrulled by any change. So it could use 2 picoseconds or something,
but that seems weird. It could just as well advance it forward by a
minute or whatever, but then it would be harder for real time to catch
up with the vector clock when forward clock slew had happened.
A complication is that many log files contain several different peices of
information, and it may be best to only use vector clocks for the same peice
of information. For example, a key's location log file contains
InfoPresent/InfoMissing for each UUID, and it only looks at the vector
clocks for the UUID that is being changed, and not other UUIDs.
Although exactly where the dividing line is can be hard to determine.
Consider metadata logs, where a field "tag" can have multiple values set
at different times. Should it advance forward past the last tag?
Probably. What about when a different field is set, should it look at
the clocks of other fields? Perhaps not, but currently it does, and
this does not seems like it will cause any problems.
Another one I'm not entirely sure about is the export log, which is
keyed by (fromuuid, touuid). So if multiple repos are exporting to the
same remote, different vector clocks can be used for that remote.
It looks like that's probably ok, because it does not try to determine
what order things occurred when there was an export conflict.
Sponsored-by: Jochen Bartl on Patreon
2021-08-03 20:45:20 +00:00
|
|
|
will make git-annex use that (or a larger number)
|
|
|
|
rather than the current number of seconds since the UNIX epoch.
|
|
|
|
Note that decimal seconds are supported.
|
2017-08-14 17:55:38 +00:00
|
|
|
|
|
|
|
This is only provided for advanced users who either have a better way to
|
|
|
|
tell which commit is current than the local clock, or who need to avoid
|
deal better with clock skew situations, using vector clocks
* Deal with clock skew, both forwards and backwards, when logging
information to the git-annex branch.
* GIT_ANNEX_VECTOR_CLOCK can now be set to a fixed value (eg 1)
rather than needing to be advanced each time a new change is made.
* Misuse of GIT_ANNEX_VECTOR_CLOCK will no longer confuse git-annex.
When changing a file in the git-annex branch, the vector clock to use is now
determined by first looking at the current time (or GIT_ANNEX_VECTOR_CLOCK
when set), and comparing it to the newest vector clock already in use in
that file. If a newer time stamp was already in use, advance it forward by
a second instead.
When the clock is set to a time in the past, this avoids logging with
an old timestamp, which would risk that log line later being ignored in favor
of "newer" line that is really not newer.
When a log entry has been made with a clock that was set far ahead in the
future, this avoids newer information being logged with an older timestamp
and so being ignored in favor of that future-timestamped information.
Once all clocks get fixed, this will result in the vector clocks being
incremented, until finally enough time has passed that time gets back ahead
of the vector clock value, and then it will return to usual operation.
(This latter situation is not ideal, but it seems the best that can be done.
The issue with it is, since all writers will be incrementing the last
vector clock they saw, there's no way to tell when one writer made a write
significantly later in time than another, so the earlier write might
arbitrarily be picked when merging. This problem is why git-annex uses
timestamps in the first place, rather than pure vector clocks.)
Advancing forward by 1 second is somewhat arbitrary. setDead
advances a timestamp by just 1 picosecond, and the vector clock could
too. But then it would interfere with setDead, which wants to be
overrulled by any change. So it could use 2 picoseconds or something,
but that seems weird. It could just as well advance it forward by a
minute or whatever, but then it would be harder for real time to catch
up with the vector clock when forward clock slew had happened.
A complication is that many log files contain several different peices of
information, and it may be best to only use vector clocks for the same peice
of information. For example, a key's location log file contains
InfoPresent/InfoMissing for each UUID, and it only looks at the vector
clocks for the UUID that is being changed, and not other UUIDs.
Although exactly where the dividing line is can be hard to determine.
Consider metadata logs, where a field "tag" can have multiple values set
at different times. Should it advance forward past the last tag?
Probably. What about when a different field is set, should it look at
the clocks of other fields? Perhaps not, but currently it does, and
this does not seems like it will cause any problems.
Another one I'm not entirely sure about is the export log, which is
keyed by (fromuuid, touuid). So if multiple repos are exporting to the
same remote, different vector clocks can be used for that remote.
It looks like that's probably ok, because it does not try to determine
what order things occurred when there was an export conflict.
Sponsored-by: Jochen Bartl on Patreon
2021-08-03 20:45:20 +00:00
|
|
|
embedding timestamps for policy reasons.
|
2017-08-14 17:55:38 +00:00
|
|
|
|
2020-05-12 13:07:45 +00:00
|
|
|
* Some special remotes use additional environment variables
|
|
|
|
for authentication etc. For example, `AWS_ACCESS_KEY_ID`
|
|
|
|
and `GIT_ANNEX_P2P_AUTHTOKEN`. See special remote documentation.
|
2017-03-17 20:02:47 +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
|
|
|
|
2014-04-01 00:15:01 +00:00
|
|
|
`.git/hooks/pre-commit-annex` in your git repository will be run whenever
|
2015-03-20 18:52:58 +00:00
|
|
|
a commit is made to the HEAD branch, either by git commit, git-annex
|
|
|
|
sync, or the git-annex assistant.
|
|
|
|
|
|
|
|
`.git/hooks/post-update-annex` in your git repository will be run
|
|
|
|
whenever the git-annex branch is updated. You can make this hook run
|
|
|
|
`git update-server-info` when publishing a git-annex repository by http.
|
2014-03-02 22:01:07 +00:00
|
|
|
|
2010-10-27 18:40:50 +00:00
|
|
|
# SEE ALSO
|
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
More git-annex documentation is available on its web site,
|
2016-02-02 20:50:58 +00:00
|
|
|
<https://git-annex.branchable.com/>
|
2010-10-27 18:40:50 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2015-01-21 16:50:09 +00:00
|
|
|
Joey Hess <id@joeyh.name>
|
2010-10-16 19:58:42 +00:00
|
|
|
|
2016-02-02 20:50:58 +00:00
|
|
|
<https://git-annex.branchable.com/>
|
2010-10-19 20:17:29 +00:00
|
|
|
|
2014-01-18 06:30:01 +00:00
|
|
|
Warning: Automatically converted into a man page by mdwn2man. Edit with care.
|