2015-03-23 19:36:10 +00:00
|
|
|
# NAME
|
|
|
|
|
|
|
|
git-annex add - adds files to the git annex
|
|
|
|
|
|
|
|
# SYNOPSIS
|
|
|
|
|
|
|
|
git annex add `[path ...]`
|
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
|
2016-01-19 21:46:46 +00:00
|
|
|
Adds the specified files to the annex. If a directory is specified,
|
|
|
|
acts on all files inside the directory and its subdirectories.
|
|
|
|
If no path is specified, adds files from the current directory and below.
|
2015-03-23 19:36:10 +00:00
|
|
|
|
2015-12-15 18:07:54 +00:00
|
|
|
Files that are already checked into git and are unmodified, or that
|
|
|
|
git has been configured to ignore will be silently skipped.
|
2015-03-23 19:36:10 +00:00
|
|
|
|
2016-12-05 17:52:40 +00:00
|
|
|
If annex.largefiles is configured, and does not match a file,
|
|
|
|
`git annex add` will behave the same as `git add` and add the
|
|
|
|
non-large file directly to the git repository, instead of to the annex.
|
2015-04-08 20:14:23 +00:00
|
|
|
|
2015-12-15 18:07:54 +00:00
|
|
|
Large files are added to the annex in locked form, which prevents further
|
|
|
|
modification of their content unless unlocked by [[git-annex-unlock]](1).
|
2016-02-16 18:43:43 +00:00
|
|
|
(This is not the case however when a repository is in a filesystem not
|
|
|
|
supporting symlinks, or is in direct mode.)
|
2015-12-15 18:07:54 +00:00
|
|
|
To add a file to the annex in unlocked form, `git add` can be used instead
|
|
|
|
(that only works when the repository has annex.version 6 or higher).
|
|
|
|
|
2015-12-15 18:14:19 +00:00
|
|
|
This command can also be used to add symbolic links, both symlinks to
|
|
|
|
annexed content, and other symlinks.
|
2015-07-07 20:15:30 +00:00
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
# OPTIONS
|
|
|
|
|
|
|
|
* `--include-dotfiles`
|
|
|
|
|
|
|
|
Dotfiles are skipped unless explicitly listed, or unless this option is
|
|
|
|
used.
|
|
|
|
|
|
|
|
* `--force`
|
|
|
|
|
|
|
|
Add gitignored files.
|
|
|
|
|
|
|
|
* `--backend`
|
|
|
|
|
|
|
|
Specifies which key-value backend to use.
|
|
|
|
|
|
|
|
* file matching options
|
|
|
|
|
|
|
|
Many of the [[git-annex-matching-options]](1)
|
|
|
|
can be used to specify files to add.
|
|
|
|
|
|
|
|
For example: `--largerthan=1GB`
|
|
|
|
|
2015-11-05 22:24:15 +00:00
|
|
|
* `--jobs=N` `-JN`
|
|
|
|
|
|
|
|
Adds multiple files in parallel. This may be faster.
|
|
|
|
For example: `-J4`
|
|
|
|
|
2017-04-07 19:55:34 +00:00
|
|
|
* `--update` `-u`
|
|
|
|
|
|
|
|
Like `git add --update`, this does not add new files, but any updates
|
|
|
|
to tracked files will be added to the index.
|
|
|
|
|
2016-01-19 15:54:13 +00:00
|
|
|
* `--json`
|
|
|
|
|
|
|
|
Enable JSON output. This is intended to be parsed by programs that use
|
|
|
|
git-annex. Each line of output is a JSON object.
|
|
|
|
|
2018-02-19 18:28:17 +00:00
|
|
|
* `--json-error-messages`
|
|
|
|
|
2018-02-19 19:33:59 +00:00
|
|
|
Messages that would normally be output to standard error are included in
|
|
|
|
the json instead.
|
2018-02-19 18:28:17 +00:00
|
|
|
|
2016-01-19 21:46:46 +00:00
|
|
|
* `--batch`
|
|
|
|
|
|
|
|
Enables batch mode, in which a file to add is read in a line from stdin,
|
|
|
|
the file is added, and repeat.
|
|
|
|
|
|
|
|
Note that if a file is skipped (due to not existing, being gitignored,
|
|
|
|
already being in git etc), an empty line will be output instead of the
|
|
|
|
normal output produced when adding a file.
|
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
# SEE ALSO
|
|
|
|
|
|
|
|
[[git-annex]](1)
|
|
|
|
|
2015-05-29 16:12:55 +00:00
|
|
|
[[git-annex-unlock]](1)
|
|
|
|
|
|
|
|
[[git-annex-lock]](1)
|
|
|
|
|
|
|
|
[[git-annex-undo]](1)
|
|
|
|
|
|
|
|
[[git-annex-import]](1)
|
|
|
|
|
|
|
|
[[git-annex-unannex]](1)
|
|
|
|
|
|
|
|
[[git-annex-reinject]](1)
|
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
# AUTHOR
|
|
|
|
|
|
|
|
Joey Hess <id@joeyh.name>
|
|
|
|
|
|
|
|
Warning: Automatically converted into a man page by mdwn2man. Edit with care.
|