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.
22
23 Large files are added to the annex in locked form, which prevents fur‐
24 ther modification of their content unless unlocked by git-
25 annex-unlock(1). (This is not the case however when a repository is in
26 a filesystem not supporting symlinks, or is in direct mode.) To add a
27 file to the annex in unlocked form, git add can be used instead (that
28 only works when the repository has annex.version 6 or higher).
29
30 This command can also be used to add symbolic links, both symlinks to
31 annexed content, and other symlinks.
32
34 --include-dotfiles
35
36 Dotfiles are skipped unless explicitly listed, or unless this
37 option is used.
38
39 --force
40 Add gitignored files.
41
42 --backend
43 Specifies which key-value backend to use.
44
45 file matching options
46 Many of the git-annex-matching-options(1) can be used to specify
47 files to add.
48
49 For example: --largerthan=1GB
50
51 --jobs=N -JN
52 Adds multiple files in parallel. This may be faster. For exam‐
53 ple: -J4
54
55 --update -u
56 Like git add --update, this does not add new files, but any
57 updates to tracked files will be added to the index.
58
59 --json Enable JSON output. This is intended to be parsed by programs
60 that use git-annex. Each line of output is a JSON object.
61
62 --json-error-messages
63 Messages that would normally be output to standard error are
64 included in the json instead.
65
66 --batch
67 Enables batch mode, in which a file to add is read in a line
68 from stdin, the file is added, and repeat.
69
70 Note that if a file is skipped (due to not existing, being git‐
71 ignored, already being in git, or doesn't meet the matching
72 options), an empty line will be output instead of the normal
73 output produced when adding a file.
74
75 -z Makes the --batch input be delimited by nulls instead of the
76 usual newlines.
77
79 git-annex(1)
80
81 git-annex-unlock(1)
82
83 git-annex-lock(1)
84
85 git-annex-undo(1)
86
87 git-annex-import(1)
88
89 git-annex-unannex(1)
90
91 git-annex-reinject(1)
92
94 Joey Hess <id@joeyh.name>
95
96 git-annex-add(1)