1git-annex(1) General Commands Manual git-annex(1)
2
3
4
6 git-annex - manage files with git, without checking their contents in
7
9 git annex command [params ...]
10
12 git-annex allows managing files with git, without checking the file
13 contents into git. While that may seem paradoxical, it is useful when
14 dealing with files larger than git can currently easily handle, whether
15 due to limitations in memory, checksumming time, or disk space.
16
17 Even without file content tracking, being able to manage files with
18 git, move files around and delete files with versioned directory trees,
19 and use branches and distributed clones, are all very handy reasons to
20 use git. And annexed files can co-exist in the same git repository with
21 regularly versioned files, which is convenient for maintaining docu‐
22 ments, Makefiles, etc that are associated with annexed files but that
23 benefit from full revision control.
24
25 When a file is annexed, its content is moved into a key-value store,
26 and a symlink is made that points to the content. These symlinks are
27 checked into git and versioned like regular files. You can move them
28 around, delete them, and so on. Pushing to another git repository will
29 make git-annex there aware of the annexed file, and it can be used to
30 retrieve its content from the key-value store.
31
33 # git annex get video/hackity_hack_and_kaxxt.mov
34 get video/hackity_hack_and_kaxxt.mov (not available)
35 I was unable to access these remotes: server
36 Try making some of these repositories available:
37 5863d8c0-d9a9-11df-adb2-af51e6559a49 -- my home file server
38 58d84e8a-d9ae-11df-a1aa-ab9aa8c00826 -- portable USB drive
39 ca20064c-dbb5-11df-b2fe-002170d25c55 -- backup SATA drive
40 failed
41 # sudo mount /media/usb
42 # git remote add usbdrive /media/usb
43 # git annex get video/hackity_hack_and_kaxxt.mov
44 get video/hackity_hack_and_kaxxt.mov (from usbdrive...) ok
45
46 # git annex add iso
47 add iso/Debian_5.0.iso ok
48
49 # git annex drop iso/Debian_4.0.iso
50 drop iso/Debian_4.0.iso ok
51
52 # git annex move iso --to=usbdrive
53 move iso/Debian_5.0.iso (moving to usbdrive...) ok
54
56 help
57
58 Display built-in help.
59
60 For help on a specific command, use git annex help command
61
62 add [path ...]
63 Adds files to the annex.
64
65 See git-annex-add(1) for details.
66
67 get [path ...]
68 Makes the content of annexed files available in this repository.
69
70 See git-annex-get(1) for details.
71
72 drop [path ...]
73 Drops the content of annexed files from this repository.
74
75 See git-annex-drop(1) for details.
76
77 move [path ...] [--from=remote|--to=remote]
78 Moves the content of files from or to another remote.
79
80 See git-annex-move(1) for details.
81
82 copy [path ...] [--from=remote|--to=remote]
83 Copies the content of files from or to another remote.
84
85 See git-annex-copy(1) for details.
86
87 status [path ...]
88 Similar to git status --short, displays the status of the files
89 in the working tree.
90
91 See git-annex-status(1) for details.
92
93 unlock [path ...]
94 Unlock annexed files for modification.
95
96 See git-annex-unlock(1) for details.
97
98 edit [path ...]
99 This is an alias for the unlock command. May be easier to remem‐
100 ber, if you think of this as allowing you to edit an annexed
101 file.
102
103 lock [path ...]
104 Use this to undo an unlock command if you don't want to modify
105 the files, or have made modifications you want to discard.
106
107 See git-annex-lock(1) for details.
108
109 sync [remote ...]
110 Synchronize local repository with remotes.
111
112 See git-annex-sync(1) for details.
113
114 mirror [path ...] [--to=remote|--from=remote]
115 Mirror content of files to/from another repository.
116
117 See git-annex-mirror(1) for details.
118
119 addurl [url ...]
120 Downloads each url to its own file, which is added to the annex.
121
122 See git-annex-addurl(1) for details.
123
124 rmurl file url
125 Record that the file is no longer available at the url.
126
127 See git-annex-rmurl(1) for details.
128
129 import --from remote branch[:subdir] | [path ...]
130 Add a tree of files to the repository.
131
132 See git-annex-import(1) for details.
133
134 importfeed [url ...]
135 Imports the contents of podcast feeds into the annex.
136
137 See git-annex-importfeed(1) for details.
138
139 export treeish --to remote
140 Export content to a remote.
141
142 See git-annex-export(1) for details.
143
144 undo [filename|directory] ...
145 Undo last change to a file or directory.
146
147 See git-annex-undo(1) for details.
148
149 multicast
150 Multicast file distribution.
151
152 See git-annex-multicast(1) for details.
153
154 watch Watch for changes and autocommit.
155
156 See git-annex-watch(1) for details.
157
158 assistant
159 Automatically sync folders between devices.
160
161 See git-annex-assistant(1) for details.
162
163 webapp Opens a web app, that allows easy setup of a git-annex reposi‐
164 tory, and control of the git-annex assistant. If the assistant
165 is not already running, it will be started.
166
167 See git-annex-webapp(1) for details.
168
169 remotedaemon
170 Persistant communication with remotes.
171
172 See git-annex-remotedaemon(1) for details.
173
175 init [description]
176
177 Until a repository (or one of its remotes) has been initialized,
178 git-annex will refuse to operate on it, to avoid accidentally
179 using it in a repository that was not intended to have an annex.
180
181 See git-annex-init(1) for details.
182
183 describe repository description
184 Changes the description of a repository.
185
186 See git-annex-describe(1) for details.
187
188 initremote name type=value [param=value ...]
189 Creates a new special remote, and adds it to .git/config.
190
191 See git-annex-initremote(1) for details.
192
193 enableremote name [param=value ...]
194 Enables use of an existing special remote in the current reposi‐
195 tory.
196
197 See git-annex-enableremote(1) for details.
198
199 renameremote
200 Renames a special remote.
201
202 See git-annex-renameremote(1) for details.
203
204 enable-tor
205 Sets up tor hidden service.
206
207 See git-annex-enable-tor(1) for details.
208
209 numcopies [N]
210 Configure desired number of copies.
211
212 See git-annex-numcopies(1) for details.
213
214 mincopies [N]
215 Configure minimum number of copies.
216
217 See git-annex-mincopies(1) for details.
218
219 trust [repository ...]
220 Records that a repository is trusted to not unexpectedly lose
221 content. Use with care.
222
223 See git-annex-trust(1) for details.
224
225 untrust [repository ...]
226 Records that a repository is not trusted and could lose content
227 at any time.
228
229 See git-annex-untrust(1) for details.
230
231 semitrust [repository ...]
232 Returns a repository to the default semi trusted state.
233
234 See git-annex-semitrust(1) for details.
235
236 group repository groupname
237 Add a repository to a group.
238
239 See git-annex-group(1) for details.
240
241 ungroup repository groupname
242 Removes a repository from a group.
243
244 See git-annex-ungroup(1) for details.
245
246 wanted repository [expression]
247 Get or set preferred content expression.
248
249 See git-annex-wanted(1) for details.
250
251 groupwanted groupname [expression]
252 Get or set groupwanted expression.
253
254 See git-annex-groupwanted(1) for details.
255
256 required repository [expression]
257 Get or set required content expression.
258
259 See git-annex-required(1) for details.
260
261 schedule repository [expression]
262 Get or set scheduled jobs.
263
264 See git-annex-schedule(1) for details.
265
266 config Get and set other configuration stored in git-annex branch.
267
268 See git-annex-config(1) for details.
269
270 vicfg Opens EDITOR on a temp file containing most of the above config‐
271 uration settings, as well as a few others, and when it exits,
272 stores any changes made back to the git-annex branch.
273
274 See git-annex-vicfg(1) for details.
275
276 adjust Switches a repository to use an adjusted branch, which can auto‐
277 matically unlock all files, etc.
278
279 See git-annex-adjust(1) for details.
280
281 direct Switches a repository to use direct mode. (deprecated)
282
283 See git-annex-direct(1) for details.
284
285 indirect
286 Switches a repository to use indirect mode. (deprecated)
287
288 See git-annex-indirect(1) for details.
289
291 fsck [path ...]
292
293 Checks the annex consistency, and warns about or fixes any prob‐
294 lems found. This is a good complement to git fsck.
295
296 See git-annex-fsck(1) for details.
297
298 expire [repository:]time ...
299 Expires repositories that have not recently performed an activ‐
300 ity (such as a fsck).
301
302 See git-annex-expire(1) for details.
303
304 unused Checks the annex for data that does not correspond to any files
305 present in any tag or branch, and prints a numbered list of the
306 data.
307
308 See git-annex-unused(1) for details.
309
310 dropunused [number|range ...]
311 Drops the data corresponding to the numbers, as listed by the
312 last git annex unused
313
314 See git-annex-dropunused(1) for details.
315
316 addunused [number|range ...]
317 Adds back files for the content corresponding to the numbers or
318 ranges, as listed by the last git annex unused.
319
320 See git-annex-addunused(1) for details.
321
322 fix [path ...]
323 Fixes up symlinks that have become broken to again point to an‐
324 nexed content.
325
326 See git-annex-fix(1) for details.
327
328 merge Automatically merge changes from remotes.
329
330 See git-annex-merge(1) for details.
331
332 upgrade
333 Upgrades the repository.
334
335 See git-annex-upgrade(1) for details.
336
337 dead [repository ...] [--key key]
338 Indicates that a repository or a single key has been irretriev‐
339 ably lost.
340
341 See git-annex-dead(1) for details.
342
343 forget Causes the git-annex branch to be rewritten, throwing away his‐
344 torical data about past locations of files.
345
346 See git-annex-forget(1) for details.
347
348 filter-branch
349 Produces a filtered version of the git-annex branch.
350
351 See git-annex-filter-branch(1) for details.
352
353 repair This can repair many of the problems with git repositories that
354 git fsck detects, but does not itself fix. It's useful if a
355 repository has become badly damaged. One way this can happen is
356 if a repository used by git-annex is on a removable drive that
357 gets unplugged at the wrong time.
358
359 See git-annex-repair(1) for details.
360
361 p2p Configure peer-2-Peer links between repositories.
362
363 See git-annex-p2p(1) for details.
364
366 find [path ...]
367
368 Outputs a list of annexed files in the specified path. With no
369 path, finds files in the current directory and its subdirecto‐
370 ries.
371
372 See git-annex-find(1) for details.
373
374 whereis [path ...]
375 Displays information about where the contents of files are lo‐
376 cated.
377
378 See git-annex-whereis(1) for details.
379
380 list [path ...]
381 Displays a table of remotes that contain the contents of the
382 specified files. This is similar to whereis but a more compact
383 display.
384
385 See git-annex-list(1) for details.
386
387 whereused
388 Finds what files use or used a key.
389
390 log [path ...]
391 Displays the location log for the specified file or files, show‐
392 ing each repository they were added to ("+") and removed from
393 ("-").
394
395 See git-annex-log(1) for details.
396
397 info [directory|file|remote|uuid ...]
398 Displays statistics and other information for the specified
399 item, which can be a directory, or a file, or a remote, or the
400 uuid of a repository.
401
402 When no item is specified, displays statistics and information
403 for the repository as a whole.
404
405 See git-annex-info(1) for details.
406
407 version
408 Shows the version of git-annex, as well as repository version
409 information.
410
411 See git-annex-version(1) for details.
412
413 map Generate map of repositories.
414
415 See git-annex-map(1) for details.
416
417 inprogress
418 Access files while they're being downloaded.
419
420 See git-annex-inprogress(1) for details.
421
423 metadata [path ...]
424
425 The content of an annexed file can have any number of metadata
426 fields attached to it to describe it. Each metadata field can in
427 turn have any number of values.
428
429 This command can be used to set metadata, or show the currently
430 set metadata.
431
432 See git-annex-metadata(1) for details.
433
434 view [tag ...] [field=value ...] [field=glob ...] [!tag ...]
435 [field!=value ...]
436 Uses metadata to build a view branch of the files in the current
437 branch, and checks out the view branch. Only files in the cur‐
438 rent branch whose metadata matches all the specified field val‐
439 ues and tags will be shown in the view.
440
441 See git-annex-view(1) for details.
442
443 vpop [N]
444 Switches from the currently active view back to the previous
445 view. Or, from the first view back to original branch.
446
447 See git-annex-vpop(1) for details.
448
449 vfilter [tag ...] [field=value ...] [!tag ...] [field!=value ...]
450 Filters the current view to only the files that have the speci‐
451 fied field values and tags.
452
453 See git-annex-vfilter(1) for details.
454
455 vadd [field=glob ...] [field=value ...] [tag ...]
456 Changes the current view, adding an additional level of directo‐
457 ries to categorize the files.
458
459 See git-annex-vfilter(1) for details.
460
461 vcycle When a view involves nested subdirectories, this cycles the or‐
462 der.
463
464 See git-annex-vcycle(1) for details.
465
467 migrate [path ...]
468
469 Changes the specified annexed files to use a different key-value
470 backend.
471
472 See git-annex-migrate(1) for details.
473
474 reinject src dest
475 Moves the src file into the annex as the content of the dest
476 file. This can be useful if you have obtained the content of a
477 file from elsewhere and want to put it in the local annex.
478
479 See git-annex-reinject(1) for details.
480
481 unannex [path ...]
482 Use this to undo an accidental git annex add command. It puts
483 the file back how it was before the add.
484
485 See git-annex-unannex(1) for details.
486
487 uninit De-initialize git-annex and clean out repository.
488
489 See git-annex-uninit(1) for details.
490
491 reinit uuid|description
492 Initialize repository, reusing old UUID.
493
494 See git-annex-reinit(1) for details.
495
497 pre-commit [path ...]
498
499 This is meant to be called from git's pre-commit hook. git annex
500 init automatically creates a pre-commit hook using this.
501
502 See git-annex-pre-commit(1) for details.
503
504 post-receive
505 This is meant to be called from git's post-receive hook. git an‐
506 nex init automatically creates a post-receive hook using this.
507
508 See git-annex-post-receive(1) for details.
509
510 lookupkey [file ...]
511 Looks up key used for file.
512
513 See git-annex-lookupkey(1) for details.
514
515 calckey [file ...]
516 Calculates the key that would be used to refer to a file.
517
518 See git-annex-calckey(1) for details.
519
520 contentlocation [key ..]
521 Looks up location of annexed content for a key.
522
523 See git-annex-contentlocation(1) for details.
524
525 examinekey [key ...]
526 Print information that can be determined purely by looking at
527 the key.
528
529 See git-annex-examinekey(1) for details.
530
531 matchexpression
532 Checks if a preferred content expression matches provided data.
533
534 See git-annex-matchexpression(1) for details.
535
536 fromkey [key file]
537 Manually set up a file in the git repository to link to a speci‐
538 fied key.
539
540 See git-annex-fromkey(1) for details.
541
542 registerurl [key url]
543 Registers an url for a key.
544
545 See git-annex-registerurl(1) for details.
546
547 unregisterurl [key url]
548 Unregisters an url for a key.
549
550 See git-annex-unregisterurl(1) for details.
551
552 setkey key file
553 Moves a file into the annex as the content of a key.
554
555 See git-annex-setkey(1) for details.
556
557 dropkey [key ...]
558 Drops annexed content for specified keys.
559
560 See git-annex-dropkey(1) for details.
561
562 transferkey key [--from=remote|--to=remote]
563 Transfers a key from or to a remote.
564
565 See git-annex-transferkey(1) for details.
566
567 transferrer
568 Used internally by git-annex to transfer content.
569
570 See git-annex-transferrer(1) for details.
571
572 transferkeys
573 Used internally by old versions of the assistant.
574
575 See git-annex-transferkey(1) for details.
576
577 setpresentkey key uuid [1|0]
578 This plumbing-level command changes git-annex's records about
579 whether the specified key's content is present in a remote with
580 the specified uuid.
581
582 See git-annex-setpresentkey(1) for details.
583
584 readpresentkey key uuid
585 Read records of where key is present.
586
587 See git-annex-readpresentkey(1) for details.
588
589 checkpresentkey key remote
590 Check if key is present in remote.
591
592 See git-annex-checkpresentkey(1) for details.
593
594 rekey [file key ...]
595 Change keys used for files.
596
597 See git-annex-rekey(1) for details.
598
599 resolvemerge
600 Resolves a conflicted merge, by adding both conflicting versions
601 of the file to the tree, using variants of their filename. This
602 is done automatically when using git annex sync or git annex
603 merge.
604
605 See git-annex-resolvemerge(1) for details.
606
607 diffdriver
608 This can be used to make git diff use an external diff driver
609 with annexed files.
610
611 See git-annex-diffdriver(1) for details.
612
613 smudge This command lets git-annex be used as a git filter driver, al‐
614 lowing annexed files in the git repository to be unlocked regu‐
615 lar files instead of symlinks.
616
617 See git-annex-smudge(1) for details.
618
619 filter-process
620 An alternative implementation of a git filter driver, that is
621 faster in some situations and slower in others than git-annex
622 smudge.
623
624 See git-annex-filter-process(1) for details.
625
626 restage
627 Restages unlocked files in the git index.
628
629 See git-annex-restage(1) for details.
630
631 findref [ref]
632 Lists files in a git ref. (deprecated)
633
634 See git-annex-findref(1) for details.
635
636 proxy -- git cmd [options]
637 Bypass direct mode guard. (deprecated)
638
639 See git-annex-proxy(1) for details.
640
642 test
643
644 This runs git-annex's built-in test suite.
645
646 See git-annex-test(1) for details.
647
648 testremote remote
649 This tests a remote by generating some random objects and send‐
650 ing them to the remote, then redownloading them, removing them
651 from the remote, etc.
652
653 It's safe to run in an existing repository (the repository con‐
654 tents are not altered), although it may perform expensive data
655 transfers.
656
657 See git-annex-testremote(1) for details.
658
659 fuzztest
660 Generates random changes to files in the current repository, for
661 use in testing the assistant.
662
663 See git-annex-fuzztest(1) for details.
664
665 benchmark
666 This runs git-annex's built-in benchmarks, if it was built with
667 benchmarking support.
668
669 See git-annex-benchmark(1) for details.
670
672 In addition to all the commands listed above, more commands can be
673 added to git-annex by dropping commands named like "git-annex-foo" into
674 a directory in the PATH.
675
677 Like other git commands, git-annex is configured via .git/config.
678 These settings, as well as relevant git config settings, are the ones
679 git-annex uses.
680
681 (Some of these settings can also be set, across all clones of the
682 repository, using git-annex-config. See its man page for a list.)
683
684 annex.uuid
685 A unique UUID for this repository (automatically set).
686
687 annex.backend
688 Name of the default key-value backend to use when adding new
689 files to the repository. See git-annex-backends(1) for informa‐
690 tion about available backends.
691
692 This is overridden by annex annex.backend configuration in the
693 .gitattributes files, and by the --backend option.
694
695 (This used to be named annex.backends, and that will still be
696 used if set.)
697
698 annex.securehashesonly
699 Set to true to indicate that the repository should only use
700 cryptographically secure hashes (SHA2, SHA3) and not insecure
701 hashes (MD5, SHA1) for content.
702
703 When this is set, the contents of files using cryptographically
704 insecure hashes will not be allowed to be added to the reposi‐
705 tory.
706
707 Also, git-annex fsck will complain about any files present in
708 the repository that use insecure hashes. And, git-annex import
709 --no-content will refuse to import files from special remotes
710 using insecure hashes.
711
712 To configure the behavior in new clones of the repository, this
713 can be set using git-annex-config.
714
715 annex.maxextensionlength
716 Maximum length, in bytes, of what is considered a filename ex‐
717 tension when adding a file to a backend that preserves filename
718 extensions. The default length is 4, which allows extensions
719 like "jpeg". The dot before the extension is not counted part of
720 its length. At most two extensions at the end of a filename will
721 be preserved, e.g. .gz or .tar.gz .
722
723 annex.diskreserve
724 Amount of disk space to reserve. Disk space is checked when
725 transferring annexed content to avoid running out, and addi‐
726 tional free space can be reserved via this option, to make space
727 for other data (such as git commit logs). Can be specified with
728 any commonly used units, for example, "0.5 gb", "500M", or "100
729 KiloBytes"
730
731 The default reserve is 100 megabytes.
732
733 annex.skipunknown
734 Set to true to make commands like "git-annex get" silently skip
735 over items that are listed in the command line, but are not
736 checked into git.
737
738 Set to false to make it an error for commands like "git-annex
739 get" to be asked to operate on files that are not checked into
740 git. (This is the default in recent versions of git-annex.)
741
742 Note that, when annex.skipunknown is false, a command like "git-
743 annex get ." will fail if no files in the current directory are
744 checked into git, but a command like "git-annex get" will not
745 fail, because the current directory is not listed, but is im‐
746 plicit. Commands like "git-annex get foo/" will fail if no files
747 in the directory are checked into git, but if at least one file
748 is, it will ignore other files that are not. This is all the
749 same as the behavior of "git-ls files --error-unmatch".
750
751 Also note that git-annex skips files that are checked into git,
752 but are not annexed files, this setting does not affect that.
753
754 annex.largefiles
755 Used to configure which files are large enough to be added to
756 the annex. It is an expression that matches the large files, eg
757 "include=*.mp3 or largerthan=500kb" See git-annex-matching-ex‐
758 pression(1) for details on the syntax.
759
760 Overrides any annex.largefiles attributes in .gitattributes
761 files.
762
763 To configure a default annex.largefiles for all clones of the
764 repository, this can be set in git-annex-config(1).
765
766 This configures the behavior of both git-annex and git when
767 adding files to the repository. By default, git-annex add adds
768 all files to the annex (except dotfiles), and git add adds files
769 to git (unless they were added to the annex previously). When
770 annex.largefiles is configured, both git annex add and git add
771 will add matching large files to the annex, and the other files
772 to git.
773
774 Other git-annex commands also honor annex.largefiles, including
775 git annex import, git annex addurl, git annex importfeed and the
776 assistant.
777
778 annex.dotfiles
779 Normally, dotfiles are assumed to be files like .gitignore,
780 whose content should always be part of the git repository, so
781 they will not be added to the annex. Setting annex.dotfiles to
782 true makes dotfiles be added to the annex the same as any other
783 file.
784
785 To annex only some dotfiles, set this and configure annex.large‐
786 files to match the ones you want. For example, to match only
787 dotfiles ending in ".big"
788
789 git config annex.largefiles "(include=.*.big or in‐
790 clude=*/.*.big) or (exclude=.* and exclude=*/.*)"
791 git config annex.dotfiles true
792
793 To configure a default annex.dotfiles for all clones of the
794 repository, this can be set in git-annex-config(1).
795
796 annex.gitaddtoannex
797 Setting this to false will prevent git add from adding files to
798 the annex, despite the annex.largefiles configuration.
799
800 annex.addsmallfiles
801 Controls whether small files (not matching annex.largefiles)
802 should be checked into git by git annex add. Defaults to true;
803 set to false to instead make small files be skipped.
804
805 annex.addunlocked
806 Commands like git-annex add default to adding files to the
807 repository in locked form. This can make them add the files in
808 unlocked form, the same as if git-annex-unlock(1) were run on
809 the files.
810
811 This can be set to "true" to add everything unlocked, or it can
812 be a more complicated expression that matches files by name,
813 size, or content. See git-annex-matching-expression(1) for de‐
814 tails.
815
816 To configure a default annex.addunlocked for all clones of the
817 repository, this can be set in git-annex-config(1).
818
819 (Using git add always adds files in unlocked form and it is not
820 affected by this setting.)
821
822 When a repository has core.symlinks set to false, or has an ad‐
823 justed unlocked branch checked out, this setting is ignored, and
824 files are always added to the repository in unlocked form.
825
826 annex.numcopies
827 This is a deprecated setting. You should instead use the git an‐
828 nex numcopies command to configure how many copies of files are
829 kept across all repositories, or the annex.numcopies .gitat‐
830 tributes setting.
831
832 This config setting is only looked at when git annex numcopies
833 has never been configured, and when there's no annex.numcopies
834 setting in the .gitattributes file.
835
836 annex.genmetadata
837 Set this to true to make git-annex automatically generate some
838 metadata when adding files to the repository.
839
840 In particular, it stores year, month, and day metadata, from the
841 file's modification date.
842
843 When importfeed is used, it stores additional metadata from the
844 feed, such as the author, title, etc.
845
846 annex.used-refspec
847 This controls which refs git-annex unused considers to be used.
848 See REFSPEC FORMAT in git-annex-unused(1) for details.
849
850 annex.jobs
851 Configure the number of concurrent jobs to run. Default is 1.
852
853 Only git-annex commands that support the --jobs option will use
854 this.
855
856 Setting this to "cpus" will run one job per CPU core.
857
858 When the --batch option is used, this configuration is ignored.
859
860 annex.adjustedbranchrefresh
861 When git-annex-adjust(1) is used to set up an adjusted branch
862 that needs to be refreshed after getting or dropping files, this
863 config controls how frequently the branch is refreshed.
864
865 Refreshing the branch takes some time, so doing it after every
866 file can be too slow. (It also can generate a lot of dangling
867 git objects.) The default value is 0 (or false), which does not
868 refresh the branch. Setting 1 (or true) will refresh only once,
869 after git-annex has made other changes. Setting 2 refreshes af‐
870 ter every file, 3 after every other file, and so on; setting 100
871 refreshes after every 99 files.
872
873 (If git-annex gets faster in the future, refresh rates will in‐
874 crease proportional to the speed improvements.)
875
876 annex.queuesize
877 git-annex builds a queue of git commands, in order to combine
878 similar commands for speed. By default the size of the queue is
879 limited to 10240 commands; this can be used to change the size.
880 If you have plenty of memory and are working with very large
881 numbers of files, increasing the queue size can speed it up.
882
883 annex.bloomcapacity
884 The git annex unused and git annex sync --content commands use a
885 bloom filter to determine what files are present in eg, the work
886 tree. The default bloom filter is sized to handle up to 500000
887 files. If your repository is larger than that, you should in‐
888 crease this value. Larger values will make git-annex unused and
889 git annex sync --content consume more memory; run git annex info
890 for memory usage numbers.
891
892 annex.bloomaccuracy
893 Adjusts the accuracy of the bloom filter used by git annex un‐
894 used and git annex sync --content. The default accuracy is
895 10000000 -- 1 unused file out of 10000000 will be missed by git
896 annex unused. Increasing the accuracy will make git annex unused
897 consume more memory; run git annex info for memory usage num‐
898 bers.
899
900 annex.sshcaching
901 By default, git-annex caches ssh connections using ssh's Con‐
902 trolMaster and ControlPersist settings (if built using a new
903 enough ssh). To disable this, set to false.
904
905 annex.adviceNoSshCaching
906 When git-annex is unable to use ssh connection caching, or has
907 been configured not to, and concurrency is enabled, it will warn
908 that this might result in multiple ssh processes prompting for
909 passwords at the same time. To disable that warning, eg if you
910 have configured ssh connection caching yourself, or have ssh
911 agent caching passwords, set this to false.
912
913 annex.alwayscommit
914 By default, git-annex automatically commits data to the git-an‐
915 nex branch after each command is run. If you have a series of
916 commands that you want to make a single commit, you can run the
917 commands with -c annex.alwayscommit=false. You can later commit
918 the data by running git annex merge (or by automatic merges) or
919 git annex sync.
920
921 annex.commitmessage
922 When git-annex updates the git-annex branch, it usually makes up
923 its own commit message (eg "update"), since users rarely look at
924 or care about changes to that branch. If you do care, you can
925 specify this setting by running commands with -c annex.com‐
926 mitmessage=whatever
927
928 This works well in combination with annex.alwayscommit=false, to
929 gather up a set of changes and commit them with a message you
930 specify.
931
932 annex.alwayscompact
933 By default, git-annex compacts data it records in the git-annex
934 branch. Setting this to false avoids doing that compaction in
935 some cases, which can speed up operations that populate the git-
936 annex branch with a lot of data. However, when used with opera‐
937 tions that overwrite old values in the git-annex branch, that
938 may cause the git-annex branch to use more disk space, and so
939 slow down reading data from it.
940
941 An example of a command that can be sped up by using -c an‐
942 nex.alwayscompact=false is git-annex registerurl --batch, when
943 adding a large number of urls to the same key.
944
945 This option was first supported by git-annex version
946 10.20220724. It is not entirely safe to set this option in a
947 repository that may also be used by an older version of git-an‐
948 nex at the same time as a version that supports this option.
949
950 annex.allowsign
951 By default git-annex avoids gpg signing commits that it makes
952 when they're not the purpose of a command, but only a side ef‐
953 fect. That default avoids lots of gpg password prompts when
954 commit.gpgSign is set. A command like git annex sync or git an‐
955 nex merge will gpg sign its commit, but a command like git annex
956 get, that updates the git-annex branch, will not. The assistant
957 also avoids signing commits.
958
959 Setting annex.allowsign to true lets all commits be signed, as
960 controlled by commit.gpgSign and other git configuration.
961
962 annex.merge-annex-branches
963 By default, git-annex branches that have been pulled from re‐
964 motes are automatically merged into the local git-annex branch,
965 so that git-annex has the most up-to-date possible knowledge.
966
967 To avoid that merging, set this to "false".
968
969 This can be useful particularly when you don't have write per‐
970 mission to the repository. While git-annex is mostly able to
971 work in a read-only repository with unmerged git-annex branches,
972 some things do not work, and when it does work it will be slower
973 due to needing to look at each of the unmerged branches.
974
975 annex.private
976 When this is set to true, no information about the repository
977 will be recorded in the git-annex branch.
978
979 For example, to make a repository without any mention of it ever
980 appearing in the git-annex branch:
981
982 git init myprivate
983 cd myprivaterepo
984 git config annex.private true
985 git annex init
986
987 annex.hardlink
988 Set this to true to make file contents be hard linked between
989 the repository and its remotes when possible, instead of a more
990 expensive copy.
991
992 Use with caution -- This can invalidate numcopies counting,
993 since with hard links, fewer copies of a file can exist. So, it
994 is a good idea to mark a repository using this setting as un‐
995 trusted.
996
997 When a repository is set up using git clone --shared, git-annex
998 init will automatically set annex.hardlink and mark the reposi‐
999 tory as untrusted.
1000
1001 When annex.thin is also set, setting annex.hardlink has no ef‐
1002 fect.
1003
1004 annex.thin
1005 Set this to true to make unlocked files be a hard link to their
1006 content in the annex, rather than a second copy. This can save
1007 considerable disk space, but when a modification is made to a
1008 file, you will lose the local (and possibly only) copy of the
1009 old version. So, enable with care.
1010
1011 After setting (or unsetting) this, you should run git annex fix
1012 to fix up the annexed files in the work tree to be hard links
1013 (or copies).
1014
1015 Note that this has no effect when the filesystem does not sup‐
1016 port hard links. And when multiple files in the work tree have
1017 the same content, only one of them gets hard linked to the an‐
1018 nex.
1019
1020 annex.supportunlocked
1021 By default git-annex supports unlocked files as well as locked
1022 files, so this defaults to true. If set to false, git-annex will
1023 only support locked files. That will avoid doing the work needed
1024 to support unlocked files.
1025
1026 Note that setting this to false does not prevent a repository
1027 from having unlocked files added to it, and in that case the
1028 content of the files will not be accessible until they are
1029 locked.
1030
1031 After changing this config, you need to re-run git-annex init
1032 for it to take effect.
1033
1034 annex.resolvemerge
1035 Set to false to prevent merge conflicts in the checked out
1036 branch being automatically resolved by the git-annex assitant,
1037 git-annex sync, git-annex merge, and the git-annex post-receive
1038 hook.
1039
1040 To configure the behavior in all clones of the repository, this
1041 can be set in git-annex-config(1).
1042
1043 annex.synccontent
1044 Set to true to make git-annex sync default to syncing annexed
1045 content.
1046
1047 To configure the behavior in all clones of the repository, this
1048 can be set in git-annex-config(1).
1049
1050 annex.synconlyannex
1051 Set to true to make git-annex sync default to only sincing the
1052 git-annex branch and annexed content.
1053
1054 To configure the behavior in all clones of the repository, this
1055 can be set in git-annex-config(1).
1056
1057 annex.debug
1058 Set to true to enable debug logging by default.
1059
1060 annex.debugfilter
1061 Set to configure which debug messages to display (when debug
1062 message display has been enabled by annex.debug or --debug). The
1063 value is one or more module names, separated by commas.
1064
1065 annex.version
1066 The current version of the git-annex repository. This is main‐
1067 tained by git-annex and should never be manually changed.
1068
1069 annex.autoupgraderepository
1070 When an old git-annex repository version is no longer supported,
1071 git-annex will normally automatically upgrade the repository to
1072 the new version. It may also sometimes upgrade from an old
1073 repository version that is still supported but that is not as
1074 good as a later version.
1075
1076 If this is set to false, git-annex won't automatically upgrade
1077 the repository. If the repository version is not supported, git-
1078 annex will instead exit with an error message. If it is still
1079 supported, git-annex will continue to work.
1080
1081 You can run git annex upgrade yourself when you are ready to up‐
1082 grade the repository.
1083
1084 annex.crippledfilesystem
1085 Set to true if the repository is on a crippled filesystem, such
1086 as FAT, which does not support symbolic links, or hard links, or
1087 unix permissions. This is automatically probed by "git annex
1088 init".
1089
1090 annex.pidlock
1091 Normally, git-annex uses fine-grained lock files to allow multi‐
1092 ple processes to run concurrently without getting in each oth‐
1093 ers' way. That works great, unless you are using git-annex on a
1094 filesystem that does not support POSIX fcntl locks. This is
1095 sometimes the case when using NFS or Lustre filesystems.
1096
1097 To support such situations, you can set annex.pidlock to true,
1098 and it will fall back to a single top-level pid file lock.
1099
1100 Although, often, you'd really be better off fixing your net‐
1101 worked filesystem configuration to support POSIX locks.. And,
1102 some networked filesystems are so inconsistent that one node
1103 can't reliably tell when the other node is holding a pid lock.
1104 Caveat emptor.
1105
1106 annex.pidlocktimeout
1107 git-annex will wait up to this many seconds for the pid lock
1108 file to go away, and will then abort if it cannot continue. De‐
1109 fault: 300
1110
1111 When using pid lock files, it's possible for a stale lock file
1112 to get left behind by previous run of git-annex that crashed or
1113 was interrupted. This is mostly avoided, but can occur espe‐
1114 cially when using a network file system. This timeout prevents
1115 git-annex waiting forever in such a situation.
1116
1117 annex.dbdir
1118 The directory where git-annex should store its sqlite databases.
1119 The default location is inside .git/annex/.
1120
1121 Certian filesystems, such as cifs, may not support locking oper‐
1122 ations that sqlite needs, and setting this to a directory on an‐
1123 other filesystem can work around such a problem.
1124
1125 This can safely be set to the same directory in the configura‐
1126 tion of multiple repositories; each repository will use a subdi‐
1127 rectory for its sqlite database.
1128
1129 annex.cachecreds
1130 When "true" (the default), git-annex will cache credentials used
1131 to access special remotes in files in .git/annex/creds/ that
1132 only you can read. To disable that caching, set to "false", and
1133 credentials will only be read from the environment, or if they
1134 have been embedded in encrypted form in the git repository, will
1135 be extracted and decrypted each time git-annex needs to access
1136 the remote.
1137
1138 annex.secure-erase-command
1139 This can be set to a command that should be run whenever git-an‐
1140 nex removes the content of a file from the repository.
1141
1142 In the command line, %file is replaced with the file that should
1143 be erased.
1144
1145 For example, to use the wipe command, set it to wipe -f %file.
1146
1147 annex.freezecontent-command, annex.thawcontent-command
1148 Usually the write permission bits are unset to protect annexed
1149 objects from being modified or deleted. The freezecontent-com‐
1150 mand is run after git-annex has removed (or attempted to remove)
1151 the write bit, and can be used to prevent writing in some other
1152 way. The thawcontent-command should undo its effect, and is run
1153 before git-annex restores the write bit.
1154
1155 In the command line, %path is replaced with the file or direc‐
1156 tory to operate on.
1157
1158 (When annex.crippledfilesystem is set, git-annex will not try to
1159 remove/restore the write bit, but it will still run these
1160 hooks.)
1161
1162 annex.tune.objecthash1, annex.tune.objecthashlower, annex.tune.branch‐
1163 hash1
1164 These can be passed to git annex init to tune the repository.
1165 They cannot be safely changed in a running repository and should
1166 never be set in global git configuration. For details, see
1167 <https://git-annex.branchable.com/tuning/>.
1168
1170 Remotes are configured using these settings in .git/config.
1171
1172 remote.<name>.annex-cost
1173 When determining which repository to transfer annexed files from
1174 or to, ones with lower costs are preferred. The default cost is
1175 100 for local repositories, and 200 for remote repositories.
1176
1177 remote.<name>.annex-cost-command
1178 If set, the command is run, and the number it outputs is used as
1179 the cost. This allows varying the cost based on e.g., the cur‐
1180 rent network.
1181
1182 remote.<name>.annex-start-command
1183 A command to run when git-annex begins to use the remote. This
1184 can be used to, for example, mount the directory containing the
1185 remote.
1186
1187 The command may be run repeatedly when multiple git-annex pro‐
1188 cesses are running concurrently.
1189
1190 remote.<name>.annex-stop-command
1191 A command to run when git-annex is done using the remote.
1192
1193 The command will only be run once *all* running git-annex pro‐
1194 cesses are finished using the remote.
1195
1196 remote.<name>.annex-shell
1197 Specify an alternative git-annex-shell executable on the remote
1198 instead of looking for "git-annex-shell" on the PATH.
1199
1200 This is useful if the git-annex-shell program is outside the
1201 PATH or has a non-standard name.
1202
1203 remote.<name>.annex-ignore
1204 If set to true, prevents git-annex from storing file contents on
1205 this remote by default. (You can still request it be used by
1206 the --from and --to options.)
1207
1208 This is, for example, useful if the remote is located somewhere
1209 without git-annex-shell. (For example, if it's on GitHub). Or,
1210 it could be used if the network connection between two reposito‐
1211 ries is too slow to be used normally.
1212
1213 This does not prevent git-annex sync (or the git-annex assist‐
1214 ant) from syncing the git repository to the remote.
1215
1216 remote.<name>.annex-ignore-command
1217 If set, the command is run, and if it exits nonzero, that's the
1218 same as setting annex-ignore to true. This allows controlling
1219 behavior based on e.g., the current network.
1220
1221 remote.<name>.annex-sync
1222 If set to false, prevents git-annex sync (and the git-annex as‐
1223 sistant) from syncing with this remote by default. However, git
1224 annex sync <name> can still be used to sync with the remote.
1225
1226 remote.<name>.annex-sync-command
1227 If set, the command is run, and if it exits nonzero, that's the
1228 same as setting annex-sync to false. This allows controlling be‐
1229 havior based on e.g., the current network.
1230
1231 remote.<name>.annex-pull
1232 If set to false, prevents git-annex sync (and the git-annex as‐
1233 sistant etc) from ever pulling (or fetching) from the remote.
1234
1235 remote.<name>.annex-push
1236 If set to false, prevents git-annex sync (and the git-annex as‐
1237 sistant etc) from ever pushing to the remote.
1238
1239 remote.<name>.annex-readonly
1240 If set to true, prevents git-annex from making changes to a re‐
1241 mote. This both prevents git-annex sync from pushing changes,
1242 and prevents storing or removing files from read-only remote.
1243
1244 remote.<name>.annex-verify, annex.verify
1245 By default, git-annex will verify the checksums of objects down‐
1246 loaded from remotes. If you trust a remote and don't want the
1247 overhead of these checksums, you can set this to false.
1248
1249 Note that even when this is set to false, git-annex does verifi‐
1250 cation in some edge cases, where it's likely the case than an
1251 object was downloaded incorrectly, or when needed for security.
1252
1253 remote.<name>.annex-tracking-branch
1254 This is for use with special remotes that support exports and
1255 imports.
1256
1257 When set to eg, "master", this tells git-annex that you want the
1258 special remote to track that branch.
1259
1260 When set to eg, "master:subdir", the special remote tracks only
1261 the subdirectory of that branch.
1262
1263 git-annex sync --content will import changes from the remote and
1264 merge them into the annex-tracking-branch. They also export
1265 changes made to the branch to the remote.
1266
1267 remote.<name>.annex-export-tracking
1268 Deprecated name for remote.<name>.annex-tracking-branch. Will
1269 still be used if it's configured and remote.<name>.annex-track‐
1270 ing-branch is not.
1271
1272 remote.<name>.annexUrl
1273 Can be used to specify a different url than the regular re‐
1274 mote.<name>.url for git-annex to use when talking with the re‐
1275 mote. Similar to the pushUrl used by git-push.
1276
1277 remote.<name>.annex-uuid
1278 git-annex caches UUIDs of remote repositories here.
1279
1280 remote.<name>.annex-config-uuid
1281 Used for some special remotes, points to a different special re‐
1282 mote configuration to use.
1283
1284 remote.<name>.annex-retry, annex.retry
1285 Number of times a transfer that fails can be retried. (default
1286 0)
1287
1288 remote.<name>.annex-forward-retry, annex.forward-retry
1289 If a transfer made some forward progress before failing, this
1290 allows it to be retried even when annex.retry does not. The
1291 value is the maximum number of times to do that. (default 5)
1292
1293 When both annex.retry and this are set, the maximum number of
1294 retries is the larger of the two.
1295
1296 remote.<name>.annex-retry-delay, annex.retry-delay
1297 Number of seconds to delay before the first retry of a transfer.
1298 When making multiple retries of the same transfer, the delay
1299 doubles after each retry. (default 1)
1300
1301 remote.<name>.annex-bwlimit, annex.bwlimit
1302 This can be used to limit how much bandwidth is used for a
1303 transfer from or to a remote.
1304
1305 For example, to limit transfers to 1 mebibyte per second: git
1306 config annex.bwlimit "1MiB"
1307
1308 This will work with many remotes, including git remotes, but not
1309 for remotes where the transfer is run by a separate program than
1310 git-annex.
1311
1312 remote.<name>.annex-stalldetecton, annex.stalldetection
1313 Configuring this lets stalled or too-slow transfers be detected,
1314 and dealt with, so rather than getting stuck, git-annex will
1315 cancel the stalled operation. The transfer will be considered to
1316 have failed, so settings like annex.retry will control what it
1317 does next.
1318
1319 By default, git-annex detects transfers that have probably
1320 stalled, and suggests configuring this. If it is incorrectly de‐
1321 tecting stalls, setting this to "false" will avoid that.
1322
1323 Set to "true" to enable automatic stall detection. If a remote
1324 does not update its progress consistently, no automatic stall
1325 detection will be done. And it may take a while for git-annex to
1326 decide a remote is really stalled when using automatic stall de‐
1327 tection, since it needs to be conservative about what looks like
1328 a stall.
1329
1330 For more fine control over what constitutes a stall, set to a
1331 value in the form "$amount/$timeperiod" to specify how much data
1332 git-annex should expect to see flowing, minimum, over a given
1333 period of time.
1334
1335 For example, to detect outright stalls where no data has been
1336 transferred after 30 seconds: git config annex.stalldetection
1337 "1KB/30s"
1338
1339 Or, if you have a remote on a USB drive that is normally capable
1340 of several megabytes per second, but has bad sectors where it
1341 gets stuck for a long time, you could use: git config remote.us‐
1342 bdrive.annex-stalldetection "1MB/1m"
1343
1344 This is not enabled by default, because it can make git-annex
1345 use more resources. To be able to cancel stalls, git-annex has
1346 to run transfers in separate processes (one per concurrent job).
1347 So it may need to open more connections to a remote than usual,
1348 or the communication with those processes may make it a bit
1349 slower.
1350
1351 remote.<name>.annex-checkuuid
1352 This only affects remotes that have their url pointing to a di‐
1353 rectory on the same system. git-annex normally checks the uuid
1354 of such remotes each time it's run, which lets it transparently
1355 deal with different drives being mounted to the location at dif‐
1356 ferent times.
1357
1358 Setting annex-checkuuid to false will prevent it from checking
1359 the uuid at startup (although the uuid is still verified before
1360 making any changes to the remote repository). This may be useful
1361 to set to prevent unnecessary spin-up or automounting of a
1362 drive.
1363
1364 remote.<name>.annex-trustlevel
1365 Configures a local trust level for the remote. This overrides
1366 the value configured by the trust and untrust commands. The
1367 value can be any of "trusted", "semitrusted" or "untrusted".
1368
1369 remote.<name>.annex-availability
1370 Can be used to tell git-annex whether a remote is LocallyAvail‐
1371 able or GloballyAvailable. Normally, git-annex determines this
1372 automatically.
1373
1374 remote.<name>.annex-speculate-present
1375 Set to "true" to make git-annex speculate that this remote may
1376 contain the content of any file, even though its normal location
1377 tracking does not indicate that it does. This will cause git-an‐
1378 nex to try to get all file contents from the remote. Can be use‐
1379 ful in setting up a caching remote.
1380
1381 remote.<name>.annex-private
1382 When this is set to true, no information about the remote will
1383 be recorded in the git-annex branch. This is mostly useful for
1384 special remotes, and is set when using git-annex-initremote(1)
1385 with the --private option.
1386
1387 remote.<name>.annex-bare
1388 Can be used to tell git-annex if a remote is a bare repository
1389 or not. Normally, git-annex determines this automatically.
1390
1391 remote.<name>.annex-ssh-options
1392 Options to use when using ssh to talk to this remote.
1393
1394 remote.<name>.annex-rsync-options
1395 Options to use when using rsync to or from this remote. For ex‐
1396 ample, to force IPv6, and limit the bandwidth to 100Kbyte/s, set
1397 it to -6 --bwlimit 100
1398
1399 Note that git-annex-shell has a whitelist of allowed rsync op‐
1400 tions, and others will not be be passed to the remote rsync. So
1401 using some options may break the communication between the local
1402 and remote rsyncs.
1403
1404 remote.<name>.annex-rsync-upload-options
1405 Options to use when using rsync to upload a file to a remote.
1406
1407 These options are passed after other applicable rsync options,
1408 so can be used to override them. For example, to limit upload
1409 bandwidth to 10Kbyte/s, set --bwlimit 10.
1410
1411 remote.<name>.annex-rsync-download-options
1412 Options to use when using rsync to download a file from a re‐
1413 mote.
1414
1415 These options are passed after other applicable rsync options,
1416 so can be used to override them.
1417
1418 remote.<name>.annex-rsync-transport
1419 The remote shell to use to connect to the rsync remote. Possible
1420 values are ssh (the default) and rsh, together with their argu‐
1421 ments, for instance ssh -p 2222 -c blowfish; Note that the re‐
1422 mote hostname should not appear there, see rsync(1) for details.
1423 When the transport used is ssh, connections are automatically
1424 cached unless annex.sshcaching is unset.
1425
1426 remote.<name>.annex-bup-split-options
1427 Options to pass to bup split when storing content in this re‐
1428 mote. For example, to limit the bandwidth to 100Kbyte/s, set it
1429 to --bwlimit 100k (There is no corresponding option for bup
1430 join.)
1431
1432 remote.<name>.annex-gnupg-options
1433 Options to pass to GnuPG when it's encrypting data. For in‐
1434 stance, to use the AES cipher with a 256 bits key and disable
1435 compression, set it to --cipher-algo AES256 --compress-algo
1436 none. (These options take precedence over the default GnuPG con‐
1437 figuration, which is otherwise used.)
1438
1439 remote.<name>.annex-gnupg-decrypt-options
1440 Options to pass to GnuPG when it's decrypting data. (These op‐
1441 tions take precedence over the default GnuPG configuration,
1442 which is otherwise used.)
1443
1444 annex.ssh-options, annex.rsync-options,
1445 annex.rsync-upload-options, annex.rsync-download-options, an‐
1446 nex.bup-split-options, annex.gnupg-options, annex.gnupg-de‐
1447 crypt-options
1448
1449 Default options to use if a remote does not have more specific
1450 options as described above.
1451
1452 remote.<name>.annex-rsyncurl
1453 Used by rsync special remotes, this configures the location of
1454 the rsync repository to use. Normally this is automatically set
1455 up by git annex initremote, but you can change it if needed.
1456
1457 remote.<name>.annex-buprepo
1458 Used by bup special remotes, this configures the location of the
1459 bup repository to use. Normally this is automatically set up by
1460 git annex initremote, but you can change it if needed.
1461
1462 remote.<name>.annex-borgrepo
1463 Used by borg special remotes, this configures the location of
1464 the borg repository to use. Normally this is automatically set
1465 up by git annex initremote, but you can change it if needed.
1466
1467 remote.<name>.annex-ddarrepo
1468 Used by ddar special remotes, this configures the location of
1469 the ddar repository to use. Normally this is automatically set
1470 up by git annex initremote, but you can change it if needed.
1471
1472 remote.<name>.annex-directory
1473 Used by directory special remotes, this configures the location
1474 of the directory where annexed files are stored for this remote.
1475 Normally this is automatically set up by git annex initremote,
1476 but you can change it if needed.
1477
1478 remote.<name>.annex-adb
1479 Used to identify remotes on Android devices accessed via adb.
1480 Normally this is automatically set up by git annex initremote.
1481
1482 remote.<name>.annex-androiddirectory
1483 Used by adb special remotes, this is the directory on the An‐
1484 droid device where files are stored for this remote. Normally
1485 this is automatically set up by git annex initremote, but you
1486 can change it if needed.
1487
1488 remote.<name>.annex-androidserial
1489 Used by adb special remotes, this is the serial number of the
1490 Android device used by the remote. Normally this is automati‐
1491 cally set up by git annex initremote, but you can change it if
1492 needed, eg when upgrading to a new Android device.
1493
1494 remote.<name>.annex-s3
1495 Used to identify Amazon S3 special remotes. Normally this is
1496 automatically set up by git annex initremote.
1497
1498 remote.<name>.annex-glacier
1499 Used to identify Amazon Glacier special remotes. Normally this
1500 is automatically set up by git annex initremote.
1501
1502 remote.<name>.annex-webdav
1503 Used to identify webdav special remotes. Normally this is auto‐
1504 matically set up by git annex initremote.
1505
1506 remote.<name>.annex-tahoe
1507 Used to identify tahoe special remotes. Points to the configu‐
1508 ration directory for tahoe.
1509
1510 remote.<name>.annex-gcrypt
1511 Used to identify gcrypt special remotes. Normally this is auto‐
1512 matically set up by git annex initremote.
1513
1514 It is set to "true" if this is a gcrypt remote. If the gcrypt
1515 remote is accessible over ssh and has git-annex-shell available
1516 to manage it, it's set to "shell".
1517
1518 remote.<name>.annex-git-lfs
1519 Used to identify git-lfs special remotes. Normally this is au‐
1520 tomatically set up by git annex initremote.
1521
1522 It is set to "true" if this is a git-lfs remote.
1523
1524 remote.<name>.annex-httpalso
1525 Used to identify httpalso special remotes. Normally this is au‐
1526 tomatically set up by git annex initremote.
1527
1528 remote.<name>.annex-externaltype
1529 Used external special remotes to record the type of the remote.
1530
1531 Eg, if this is set to "foo", git-annex will run a "git-annex-re‐
1532 mote-foo" program to communicate with the external special re‐
1533 mote.
1534
1535 If this is set to "readonly", then git-annex will not run any
1536 external special remote program, but will try to access things
1537 stored in the remote using http. That only works for some exter‐
1538 nal special remotes, so consult the documentation of the one you
1539 are using.
1540
1541 remote.<name>.annex-hooktype
1542 Used by hook special remotes to record the type of the remote.
1543
1544 annex.web-options
1545 Options to pass to curl when git-annex uses it to download urls
1546 (rather than the default built-in url downloader).
1547
1548 For example, to force IPv4 only, set it to "-4".
1549
1550 Setting this option makes git-annex use curl, but only when an‐
1551 nex.security.allowed-ip-addresses is configured in a specific
1552 way. See its documentation.
1553
1554 Setting this option prevents git-annex from using git-credential
1555 for prompting for http passwords. Instead, you can include
1556 "--netrc" to make curl use your ~/.netrc file and record the
1557 passwords there.
1558
1559 annex.youtube-dl-options
1560 Options to pass to youtube-dl (or yt-dlp) when using it to find
1561 the url to download for a video.
1562
1563 Some options may break git-annex's integration with youtube-dl.
1564 For example, the --output option could cause it to store files
1565 somewhere git-annex won't find them. Avoid setting here or in
1566 the youtube-dl config file any options that cause youtube-dl to
1567 download more than one file, or to store the file anywhere other
1568 than the current working directory.
1569
1570 annex.youtube-dl-command
1571 Command to run for youtube-dl. Default is to use "youtube-dl" or
1572 if that is not available in the PATH, to use "yt-dlp".
1573
1574 annex.aria-torrent-options
1575 Options to pass to aria2c when using it to download a torrent.
1576
1577 annex.http-headers
1578 HTTP headers to send when downloading from the web. Multiple
1579 lines of this option can be set, one per header.
1580
1581 annex.http-headers-command
1582 If set, the command is run and each line of its output is used
1583 as a HTTP header. This overrides annex.http-headers.
1584
1585 annex.security.allowed-url-schemes
1586 List of URL schemes that git-annex is allowed to download con‐
1587 tent from. The default is "http https ftp".
1588
1589 Think very carefully before changing this; there are security
1590 implications. For example, if it's changed to allow "file" URLs,
1591 then anyone who can get a commit into your git-annex repository
1592 could git-annex addurl a pointer to a private file located out‐
1593 side that repository, possibly causing it to be copied into your
1594 repository and transferred on to other remotes, exposing its
1595 content.
1596
1597 Any url schemes supported by curl can be listed here, but you
1598 will also need to configure annex.allowed-ip-addresses to allow
1599 using curl.
1600
1601 Some special remotes support their own domain-specific URL
1602 schemes; those are not affected by this configuration setting.
1603
1604 annex.security.allowed-ip-addresses
1605 By default, git-annex only makes connections to public IP ad‐
1606 dresses; it will refuse to use HTTP and other servers on local‐
1607 host or on a private network.
1608
1609 This setting can override that behavior, allowing access to par‐
1610 ticular IP addresses that would normally be blocked. For example
1611 "127.0.0.1 ::1" allows access to localhost (both IPV4 and IPV6).
1612 To allow access to all IP addresses, use "all"
1613
1614 Think very carefully before changing this; there are security
1615 implications. Anyone who can get a commit into your git-annex
1616 repository could git annex addurl an url on a private server,
1617 possibly causing it to be downloaded into your repository and
1618 transferred to other remotes, exposing its content.
1619
1620 Note that, since the interfaces of curl and youtube-dl do not
1621 allow these IP address restrictions to be enforced, curl and
1622 youtube-dl will never be used unless annex.security.al‐
1623 lowed-ip-addresses=all.
1624
1625 To allow accessing local or private IP addresses on only spe‐
1626 cific ports, use the syntax "[addr]:port". For example,
1627 "[127.0.0.1]:80 [127.0.0.1]:443 [::1]:80 [::1]:443" allows lo‐
1628 calhost on the http ports only.
1629
1630 annex.security.allowed-http-addresses
1631 Old name for annex.security.allowed-ip-addresses. If set, this
1632 is treated the same as having annex.security.allowed-ip-ad‐
1633 dresses set.
1634
1635 annex.security.allow-unverified-downloads
1636 For security reasons, git-annex refuses to download content from
1637 most special remotes when it cannot check a hash to verify that
1638 the correct content was downloaded. This particularly impacts
1639 downloading the content of URL or WORM keys, which lack hashes.
1640
1641 The best way to avoid problems due to this is to migrate files
1642 away from such keys, before their content reaches a special re‐
1643 mote. See git-annex-migrate(1).
1644
1645 When the content is only available from a special remote, you
1646 can use this configuration to force git-annex to download it.
1647 But you do so at your own risk, and it's very important you read
1648 and understand the information below first!
1649
1650 Downloading unverified content from encrypted special remotes is
1651 prevented, because the special remote could send some other en‐
1652 crypted content than what you expect, causing git-annex to de‐
1653 crypt data that you never checked into git-annex, and risking
1654 exposing the decrypted data to any non-encrypted remotes you
1655 send content to.
1656
1657 Downloading unverified content from (non-encrypted) external
1658 special remotes is prevented, because they could follow http
1659 redirects to web servers on localhost or on a private network,
1660 or in some cases to a file:/// url.
1661
1662 If you decide to bypass this security check, the best thing to
1663 do is to only set it temporarily while running the command that
1664 gets the file. The value to set the config to is "ACKTHPPT".
1665 For example:
1666
1667 git -c annex.security.allow-unverified-downloads=ACKTHPPT annex
1668 get myfile
1669
1670 It would be a good idea to check that it downloaded the file you
1671 expected, too.
1672
1673 remote.<name>.annex-security-allow-unverified-downloads
1674 Per-remote configuration of annex.security.allow-unveri‐
1675 fied-downloads.
1676
1678 annex.delayadd
1679
1680 Makes the watch and assistant commands delay for the specified
1681 number of seconds before adding a newly created file to the an‐
1682 nex. Normally this is not needed, because they already wait for
1683 all writers of the file to close it.
1684
1685 Note that this only delays adding files created while the daemon
1686 is running. Changes made when it is not running will be added
1687 immediately the next time it is started up.
1688
1689 annex.expireunused
1690 Controls what the assistant does about unused file contents that
1691 are stored in the repository.
1692
1693 The default is false, which causes all old and unused file con‐
1694 tents to be retained, unless the assistant is able to move them
1695 to some other repository (such as a backup repository).
1696
1697 Can be set to a time specification, like "7d" or "1m", and then
1698 file contents that have been known to be unused for a week or a
1699 month will be deleted.
1700
1701 annex.fscknudge
1702 When set to false, prevents the webapp from reminding you when
1703 using repositories that lack consistency checks.
1704
1705 annex.autoupgrade
1706 When set to ask (the default), the webapp will check for new
1707 versions and prompt if they should be upgraded to. When set to
1708 true, automatically upgrades without prompting (on some sup‐
1709 ported platforms). When set to false, disables any upgrade
1710 checking.
1711
1712 Note that upgrade checking is only done when git-annex is in‐
1713 stalled from one of the prebuilt images from its website. This
1714 does not bypass e.g., a Linux distribution's own upgrade han‐
1715 dling code.
1716
1717 This setting also controls whether to restart the git-annex as‐
1718 sistant when the git-annex binary is detected to have changed.
1719 That is useful no matter how you installed git-annex.
1720
1721 annex.autocommit
1722 Set to false to prevent the git-annex assistant and git-annex
1723 sync from automatically committing changes to files in the
1724 repository.
1725
1726 To configure the behavior in all clones of the repository, this
1727 can be set in git-annex-config(1).
1728
1729 annex.startupscan
1730 Set to false to prevent the git-annex assistant from scanning
1731 the repository for new and changed files on startup. This will
1732 prevent it from noticing changes that were made while it was not
1733 running, but can be a useful performance tweak for a large
1734 repository.
1735
1736 annex.listen
1737 Configures which address the webapp listens on. The default is
1738 localhost. Can be either an IP address, or a hostname that re‐
1739 solves to the desired address.
1740
1742 The key-value backend used when adding a new file to the annex can be
1743 configured on a per-file-type basis via .gitattributes files. In the
1744 file, the annex.backend attribute can be set to the name of the backend
1745 to use. (See git-annex-backends(1) for information about available
1746 backends.) For example, this here's how to use the WORM backend by de‐
1747 fault, but the SHA256E backend for ogg files:
1748
1749 * annex.backend=WORM
1750 *.ogg annex.backend=SHA256E
1751
1752 There is a annex.largefiles attribute, which is used to configure which
1753 files are large enough to be added to the annex. Since attributes can‐
1754 not contain spaces, it is difficult to use for more complex an‐
1755 nex.largefiles settings. Setting annex.largefiles in git-annex-con‐
1756 fig(1) is an easier way to configure it across all clones of the repos‐
1757 itory. See git-annex-matching-expression(1) for details on the syntax.
1758
1759 The numcopies and mincopies settings can also be configured on a
1760 per-file-type basis via the annex.numcopies and annex.mincopies at‐
1761 tributes in .gitattributes files. This overrides other settings. For
1762 example, this makes two copies be needed for wav files and 3 copies for
1763 flac files:
1764
1765 *.wav annex.numcopies=2
1766 *.flac annex.numcopies=3
1767
1768 These settings are honored by git-annex whenever it's operating on a
1769 matching file. However, when using --all, --unused, or --key to specify
1770 keys to operate on, git-annex is operating on keys and not files, so
1771 will not honor the settings from .gitattributes. For this reason, the
1772 git annex numcopies and git annex mincopies commands are useful to con‐
1773 figure a global default.
1774
1775 Also note that when using views, only the toplevel .gitattributes file
1776 is preserved in the view, so other settings in other files won't have
1777 any effect.
1778
1780 git-annex itself will exit 0 on success and 1 on failure, unless the
1781 --size-limit or --time-limit option is hit, in which case it exits 101.
1782
1783 A few git-annex subcommands have other exit statuses used to indicate
1784 specific problems, which are documented on their individual man pages.
1785
1787 These environment variables are used by git-annex when set:
1788
1789 GIT_WORK_TREE, GIT_DIR
1790 Handled the same as they are by git, see git(1)
1791
1792 GIT_SSH, GIT_SSH_COMMAND
1793 Handled similarly to the same as described in git(1). The one
1794 difference is that git-annex will sometimes pass an additional
1795 "-n" parameter to these, as the first parameter, to prevent ssh
1796 from reading from stdin. Since that can break existing uses of
1797 these environment variables that don't expect the extra parame‐
1798 ter, you will need to set GIT_ANNEX_USE_GIT_SSH=1 to make git-
1799 annex support these.
1800
1801 Note that setting either of these environment variables prevents
1802 git-annex from automatically enabling ssh connection caching
1803 (see annex.sshcaching), so it will slow down some operations
1804 with remotes over ssh. It's up to you to enable ssh connection
1805 caching if you need it; see ssh's documentation.
1806
1807 Also, annex.ssh-options and remote.<name>.annex-ssh-options
1808 won't have any effect when these envionment variables are set.
1809
1810 Usually it's better to configure any desired options through
1811 your ~/.ssh/config file, or by setting annex.ssh-options.
1812
1813 GIT_ANNEX_VECTOR_CLOCK
1814 Normally git-annex timestamps lines in the log files committed
1815 to the git-annex branch. Setting this environment variable to a
1816 number will make git-annex use that (or a larger number) rather
1817 than the current number of seconds since the UNIX epoch. Note
1818 that decimal seconds are supported.
1819
1820 This is only provided for advanced users who either have a bet‐
1821 ter way to tell which commit is current than the local clock, or
1822 who need to avoid embedding timestamps for policy reasons.
1823
1824 Some special remotes use additional environment variables
1825 for authentication etc. For example, AWS_ACCESS_KEY_ID and
1826 GIT_ANNEX_P2P_AUTHTOKEN. See special remote documentation.
1827
1829 These files are used by git-annex:
1830
1831 .git/annex/objects/ in your git repository contains the annexed file
1832 contents that are currently available. Annexed files in your git repos‐
1833 itory symlink to that content.
1834
1835 .git/annex/ in your git repository contains other run-time information
1836 used by git-annex.
1837
1838 ~/.config/git-annex/autostart is a list of git repositories to start
1839 the git-annex assistant in.
1840
1841 .git/hooks/pre-commit-annex in your git repository will be run whenever
1842 a commit is made to the HEAD branch, either by git commit, git-annex
1843 sync, or the git-annex assistant.
1844
1845 .git/hooks/post-update-annex in your git repository will be run when‐
1846 ever the git-annex branch is updated. You can make this hook run git
1847 update-server-info when publishing a git-annex repository by http.
1848
1850 More git-annex documentation is available on its web site,
1851 <https://git-annex.branchable.com/>
1852
1853 If git-annex is installed from a package, a copy of its documentation
1854 should be included, in, for example, /usr/share/doc/git-annex/.
1855
1857 Joey Hess <id@joeyh.name>
1858
1859 <https://git-annex.branchable.com/>
1860
1861 git-annex(1)