1git-annex-config(1)         General Commands Manual        git-annex-config(1)
2
3
4

NAME

6       git-annex-config - configuration stored in git-annex branch
7

SYNOPSIS

9       git annex config --set name value
10
11       git annex config --get name
12
13       git annex config --unset name
14
15       git annex config --show-origin name
16

DESCRIPTION

18       Set or get configuration settings stored in the git-annex branch.
19
20       Unlike git config settings, these settings can be seen in all clones of
21       the repository, once they have gotten their git-annex branches in sync.
22
23       These settings can be overridden on a per-repository  basis  using  git
24       config.
25
26       git-annex  does  not  check the git-annex branch for all the git config
27       settings that affect it (which are listed on  the  git-annex  man  page
28       CONFIGURATION  section).  Only  a few make sense to be able to set such
29       that all clones of a repository see the setting, and so git-annex  only
30       looks for these.
31

SUPPORTED SETTINGS

33       annex.numcopies
34
35              Tells  git-annex  how  many  copies it should preserve of files,
36              over all repositories. The default is 1.
37
38              When git-annex is asked to drop a file, it first  verifies  that
39              the number of copies can be satisfied among all the other repos‐
40              itories that have a copy of the file.
41
42              In unusual situations, involving special  remotes  that  do  not
43              support  locking,  and concurrent drops of the same content from
44              multiple repositories, git-annex may violate the numcopies  set‐
45              ting. It still guarantees at least 1 copy is preserved. This can
46              be configured by setting annex.mincopies.
47
48              This is the same setting that the git-annex-numcopies(1) command
49              configures.  It can be overridden on a per-file basis by the an‐
50              nex.numcopies setting in .gitattributes files.
51
52       annex.mincopies
53              Tells git-annex how many copies it is required  to  preserve  of
54              files, over all repositories. The default is 1.
55
56              This supplements the annex.numcopies setting.  In unusual situa‐
57              tions, involving special remotes that do  not  support  locking,
58              and concurrent drops of the same content from multiple reposito‐
59              ries, git-annex may violate the numcopies setting.  In these un‐
60              usual  situations,  git-annex  ensures that the number of copies
61              never goes below mincopies.
62
63              It is a good idea to not only rely on  only  setting  mincopies.
64              Set numcopies as well, to a larger number, and keep mincopies at
65              the bare minimum you're comfortable with. Setting mincopies to a
66              large  number,  rather than setting numcopies will in some cases
67              prevent droping content in entirely safe situations.
68
69              This is the same setting that the git-annex-mincopies(1) command
70              configures.  It can be overridden on a per-file basis by the an‐
71              nex.mincopies setting in .gitattributes files.
72
73       annex.largefiles
74              Used to configure which files are large enough to  be  added  to
75              the annex.  It is an expression that matches the large files, eg
76              "include=*.mp3  or  largerthan(500kb)".   See   git-annex-match‐
77              ing-expression(1) for details on the syntax.
78
79              This  configures  the  behavior  of  both git-annex and git when
80              adding files to the repository. By default, git-annex  add  adds
81              all files to the annex (except dotfiles), and git add adds files
82              to git (unless they were added to the annex  previously).   When
83              annex.largefiles  is  configured, both git annex add and git add
84              will add matching large files to the annex, and the other  files
85              to git.
86
87              Other  git-annex commands also honor annex.largefiles, including
88              git annex import, git annex addurl, git annex  importfeed,  git-
89              annex assist, and the git-annex assistant.
90
91              This sets a default, which can be overridden by annex.largefiles
92              attributes in .gitattributes files, or by git config.
93
94       annex.dotfiles
95              Normally, dotfiles are assumed  to  be  files  like  .gitignore,
96              whose  content  should  always be part of the git repository, so
97              they will not be added to the annex. Setting  annex.dotfiles  to
98              true  makes dotfiles be added to the annex the same as any other
99              file.
100
101              This sets a default, which can be overridden  by  annex.dotfiles
102              in git config.
103
104       annex.addunlocked
105              Commands  like  git-annex  add  default  to  adding files to the
106              repository in locked form. This can make them add the  files  in
107              unlocked  form,  the  same as if git-annex-unlock(1) were run on
108              the files.
109
110              This can be set to "true" to add everything unlocked, or it  can
111              be  a  more  complicated  expression that matches files by name,
112              size, or content. See git-annex-matching-expression(1)  for  de‐
113              tails.
114
115              This  sets  a  default,  which can be overridden by annex.addun‐
116              locked in git config.
117
118       annex.autocommit
119              Set to false to prevent the git-annex assistant,  git-annex  as‐
120              sist and git-annex sync from automatically committing changes to
121              files in the repository.
122
123              This sets a default, which can be overridden by annex.autocommit
124              in git config.
125
126       annex.resolvemerge
127              Set  to  false  to  prevent  merge  conflicts in the checked out
128              branch being automatically resolved by the  git-annex  assitant,
129              git-annex sync, git-annex pull, git-annex merge, and the git-an‐
130              nex post-receive hook.
131
132              This sets a default, which can be overridden  by  annex.resolve‐
133              merge in git config.
134
135       annex.synccontent
136              Set  to  true to make git-annex sync default to transferring an‐
137              nexed content.
138
139              Set to false to prevent git-annex pull and git-annex  push  from
140              transferring annexed content.
141
142              This  sets  a default, which can be overridden by annex.synccon‐
143              tent in git config.
144
145       annex.synconlyannex
146              Set to true to make git-annex sync, git-annex pull and git-annex
147              push default to only operate on the git-annex branch and annexed
148              content.
149
150              This sets a default,  which  can  be  overridden  by  annex.syn‐
151              conlyannex in git config.
152
153       annex.securehashesonly
154              Set  to  true  to  indicate  that the repository should only use
155              cryptographically secure hashes (SHA2, SHA3)  and  not  insecure
156              hashes (MD5, SHA1) for content.
157
158              When  this is set, the contents of files using cryptographically
159              insecure hashes will not be allowed to be added to  the  reposi‐
160              tory.
161
162              Also,  git-annex  fsck  will complain about any files present in
163              the repository that use insecure hashes.
164
165              Note that this is only read from the git-annex branch by git an‐
166              nex init, and is copied to the corresponding git config setting.
167              So, changes to the value in the git-annex branch won't affect  a
168              repository once it has been initialized.
169

OPTIONS

171       --set name value
172
173              Set a value.
174
175       --get name
176              Get a value.
177
178       --unset
179              Unset a value.
180
181       --show-origin name
182              Explain  where the value is configured, whether in the git-annex
183              branch, or in a git config file, or .gitattributes file. When  a
184              value  is  configured in multiple places, displays the place and
185              the value that will be used.
186
187              Note that the parameter can be the name of one of  the  settings
188              listed above, but also any other configuration setting supported
189              by git-annex.  For example, "annex.backend" cannot be set in the
190              git-annex  branch,  but  it  can be set in .gitattributes or git
191              config and this option can explain which setting  will  be  used
192              for it.
193
194       --for-file file
195              Can  be  used  in combination with --show-origin to specify what
196              filename to check for in .gitattributes.
197
198       Also the git-annex-common-options(1) can be used.
199

EXAMPLE

201       Suppose you want to prevent git annex sync from committing  changes  to
202       files,  so  a  manual  git commit workflow is used in all clones of the
203       repository. Then run:
204
205        git annex config --set annex.autocommit false
206
207       If you want to override that in a partiticular clone, just use git con‐
208       fig in the clone:
209
210        git config annex.autocommit true
211
212       And to get back to the default behavior:
213
214        git annex config --unset annex.autocommit
215

SEE ALSO

217       git-annex(1)
218
219       git-config(1)
220
221       git-annex-vicfg(1)
222

AUTHOR

224       Joey Hess <id@joeyh.name>
225
226                                                           git-annex-config(1)
Impressum