1git-annex-add(1) General Commands Manual git-annex-add(1)
2
3
4
6 git-annex-add - adds files to the git annex
7
9 git annex add [path ...]
10
12 Adds the specified files to the annex. If a directory is specified,
13 acts on all files inside the directory and its subdirectories. If no
14 path is specified, adds files from the current directory and below.
15
16 Files that are already checked into git and are unmodified, or that git
17 has been configured to ignore will be silently skipped.
18
19 If annex.largefiles is configured, and does not match a file, git annex
20 add will behave the same as git add and add the non-large file directly
21 to the git repository, instead of to the annex. (By default dotfiles
22 are assumed to not be large, and are added directly to git, but
23 annex.dotfiles can be configured to annex those too.)
24
25 Large files are added to the annex in locked form, which prevents fur‐
26 ther modification of their content unless unlocked by git-
27 annex-unlock(1). (This is not the case however when a repository is in
28 a filesystem not supporting symlinks.)
29
30 This command can also be used to add symbolic links, both symlinks to
31 annexed content, and other symlinks.
32
34 # git annex add foo bar
35 add foo ok
36 add bar ok
37 # git commit -m added
38
40 --no-check-gitignore
41
42 Add gitignored files.
43
44 --force-large
45 Treat all files as large files, ignoring annex.largefiles and
46 annex.dotfiles configuration, and add to the annex.
47
48 --force-small
49 Treat all files as small files, ignoring annex.largefiles and
50 annex.dotfiles and annex.addsmallfiles configuration, and add to
51 git.
52
53 --backend
54 Specifies which key-value backend to use.
55
56 file matching options
57 Many of the git-annex-matching-options(1) can be used to specify
58 files to add.
59
60 For example: --largerthan=1GB
61
62 --jobs=N -JN
63 Adds multiple files in parallel. This may be faster. For exam‐
64 ple: -J4
65
66 Setting this to "cpus" will run one job per CPU core.
67
68 --update -u
69 Like git add --update, this does not add new files, but any
70 updates to tracked files will be added to the index.
71
72 --json Enable JSON output. This is intended to be parsed by programs
73 that use git-annex. Each line of output is a JSON object.
74
75 --json-progress
76 Include progress objects in JSON output.
77
78 --json-error-messages
79 Messages that would normally be output to standard error are
80 included in the json instead.
81
82 --batch
83 Enables batch mode, in which a file to add is read in a line
84 from stdin, the file is added, and repeat.
85
86 Note that if a file is skipped (due to not existing, being git‐
87 ignored, already being in git, or doesn't meet the matching
88 options), an empty line will be output instead of the normal
89 output produced when adding a file.
90
91 -z Makes the --batch input be delimited by nulls instead of the
92 usual newlines.
93
95 git-annex(1)
96
97 git-annex-unlock(1)
98
99 git-annex-lock(1)
100
101 git-annex-undo(1)
102
103 git-annex-import(1)
104
105 git-annex-unannex(1)
106
107 git-annex-reinject(1)
108
110 Joey Hess <id@joeyh.name>
111
112 git-annex-add(1)