.TH git-annex-add 1 .SH NAME git-annex-add \- adds files to the git annex .PP .SH SYNOPSIS git annex add \fB[path ...]\fP .PP .SH DESCRIPTION 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. .PP Files that are already checked into git and are unmodified, or that git has been configured to ignore will be silently skipped. .PP If annex.largefiles is configured (in git config, gitattributes, or git-annex config), and does not match a file, \fBgit annex add\fP will behave the same as \fBgit add\fP and add the non\-large file directly to the git repository, instead of to the annex. (By default dotfiles are assumed to not be large, and are added directly to git, but annex.dotfiles can be configured to annex those too.) See the git-annex manpage for documentation of these and other configuration settings. .PP By default, large files are added to the annex in locked form, which prevents further modification of their content until unlocked by git-annex\-unlock(1). (This is not the case however when a repository is in a filesystem not supporting symlinks.) The annex.addunlocked git config (and git-annex config) can be used to change this behavior. .PP This command can also be used to add symbolic links, both symlinks to annexed content, and other symlinks. .PP .SH EXAMPLES # git annex add foo bar add foo ok add bar ok # git commit \-m added .PP .SH OPTIONS .IP "\fB\-\-no\-check\-gitignore\fP" .IP Add gitignored files. .IP .IP "\fB\-\-force\-large\fP" Treat all files as large files, ignoring annex.largefiles and annex.dotfiles configuration, and add to the annex. .IP .IP "\fB\-\-force\-small\fP" Treat all files as small files, ignoring annex.largefiles and annex.dotfiles and annex.addsmallfiles configuration, and add to git. .IP .IP "\fB\-\-backend\fP" Specifies which key\-value backend to use. .IP .IP "file matching options" Many of the git-annex\-matching\-options(1) can be used to specify files to add. .IP For example: \fB\-\-largerthan=1GB\fP .IP .IP "\fB\-\-jobs=N\fP \fB\-JN\fP" Adds multiple files in parallel. This may be faster. For example: \fB\-J4\fP .IP Setting this to "cpus" will run one job per CPU core. .IP .IP "\fB\-\-update\fP \fB\-u\fP" Like \fBgit add \-\-update\fP, this does not add new files, but any updates to tracked files will be added to the index. .IP .IP "\fB\-\-dry\-run\fP" Output what would be done for each file, but avoid making any changes. .IP .IP "\fB\-\-json\fP" Enable JSON output. This is intended to be parsed by programs that use git-annex. Each line of output is a JSON object. .IP .IP "\fB\-\-json\-progress\fP" Include progress objects in JSON output. .IP .IP "\fB\-\-json\-error\-messages\fP" Messages that would normally be output to standard error are included in the JSON instead. .IP .IP "\fB\-\-batch\fP" Enables batch mode, in which a file to add is read in a line from stdin, the file is added, and repeat. .IP Note that if a file is skipped (due to not existing, being gitignored, already being in git, or doesn't meet the matching options), an empty line will be output instead of the normal output produced when adding a file. .IP .IP "\fB\-z\fP" Makes the \fB\-\-batch\fP input be delimited by nulls instead of the usual newlines. .IP .IP "Also the git-annex\-common\-options(1) can be used." .SH SEE ALSO git-annex(1) .PP git-annex\-unlock(1) .PP git-annex\-lock(1) .PP git-annex\-undo(1) .PP git-annex\-import(1) .PP git-annex\-unannex(1) .PP git-annex\-reinject(1) .PP .SH AUTHOR Joey Hess .PP .PP