1GIT-LFS-CONFIG(5)                                            GIT-LFS-CONFIG(5)
2
3
4

NAME

6       git-lfs-config - Configuration options for git-lfs
7

CONFIGURATION FILES

9       git-lfs  reads  its configuration from any file supported by git config
10       -l, including all per-repository, per-user, and per-system Git configu‐
11       ration files.
12
13       Additionally,  a  small  number  of settings can be specified in a file
14       called .lfsconfig at the root of the repository;  see  the  "LFSCONFIG"
15       section for more details. This configuration file is useful for setting
16       options such as the LFS URL or access type for all users of  a  reposi‐
17       tory,  especially  when  these  differ from the default. The .lfsconfig
18       file uses the same format as .gitconfig.
19
20       Settings from Git configuration files  override  the  .lfsconfig  file.
21       This  allows  you to override settings like lfs.url in your local envi‐
22       ronment without having to modify the .lfsconfig file.
23
24       Most options regarding git-lfs are  contained  in  the  [lfs]  section,
25       meaning they are all named lfs.foo or similar, although occasionally an
26       lfs option can be scoped inside the configuration for a remote.
27

LIST OF OPTIONS

29   General settings
30       ·   lfs.url / remote.<remote>.lfsurl
31
32           The url used to call the Git LFS remote API. Default blank  (derive
33           from clone URL).
34
35       ·   lfs.pushurl / remote.<remote>.lfspushurl
36
37           The  url  used to call the Git LFS remote API when pushing. Default
38           blank (derive from either LFS non-push urls or clone url).
39
40       ·   lfs.dialtimeout
41
42           Sets the maximum time, in seconds, that the HTTP client  will  wait
43           to  initiate a connection. This does not include the time to send a
44           request and wait for a response. Default: 30 seconds
45
46       ·   lfs.tlstimeout
47
48           Sets the maximum time, in seconds, that the HTTP client  will  wait
49           for a TLS handshake. Default: 30 seconds.
50
51       ·   lfs.activitytimeout / lfs.https://<host>.activitytimeout
52
53           Sets  the  maximum time, in seconds, that the HTTP client will wait
54           for the next tcp read or write. If < 1, no activity timeout is used
55           at all. Default: 30 seconds
56
57       ·   lfs.keepalive
58
59           Sets  the maximum time, in seconds, for the HTTP client to maintain
60           keepalive connections. Default: 30 minutes.
61
62       ·   lfs.ssh.retries
63
64           Specifies the number of times Git LFS will attempt to obtain autho‐
65           rization via SSH before aborting. Default: 5.
66
67       ·   core.askpass, GIT_ASKPASS
68
69           Given  as a program and its arguments, this is invoked when authen‐
70           tication is needed against the LFS API. The contents of stdout  are
71           interpreted as the password.
72
73       ·   lfs.cachecredentials
74
75           Enables  in-memory SSH and Git Credential caching for a single ´git
76           lfs´ command. Default: enabled.
77
78       ·   lfs.storage
79
80           Allow override LFS storage directory. Non-absolute  path  is  rela‐
81           tivized to inside of Git repository directory (usually .git).
82
83           Note: you should not run git lfs prune if you have different repos‐
84           itories sharing the same storage directory.
85
86           Default: lfs in Git repository directory (usually .git/lfs).
87
88
89
90   Transfer (upload / download) settings
91       These settings control how the  upload  and  download  of  LFS  content
92       occurs.
93
94       ·   lfs.concurrenttransfers
95
96           The number of concurrent uploads/downloads. Default 8.
97
98       ·   lfs.basictransfersonly
99
100           If  set  to true, only basic HTTP upload/download transfers will be
101           used, ignoring any more advanced transfers that  the  client/server
102           may support. This is primarily to work around bugs or incompatibil‐
103           ities.
104
105           The git-lfs client supports basic HTTP  downloads,  resumable  HTTP
106           downloads  (using  Range headers), and resumable uploads via tus.io
107           protocol. Custom transfer methods can be added via lfs.customtrans‐
108           fer  (see  next section). However setting this value to true limits
109           the client to simple HTTP.
110
111       ·   lfs.tustransfers
112
113           If set to true, this  enables  resumable  uploads  of  LFS  objects
114           through  the  tus.io API. Once this feature is finalized, this set‐
115           ting will be removed, and tus.io uploads will be available for  all
116           clients.
117
118       ·   lfs.standalonetransferagent
119
120           Allows  the specified custom transfer agent to be used directly for
121           transferring files, without asking the  server  how  the  transfers
122           should  be  made.  The custom transfer agent has to be defined in a
123           lfs.customtransfer.<name> settings group.
124
125       ·   lfs.customtransfer.<name>.path
126
127           lfs.customtransfer.<name> is a settings group which defines a  cus‐
128           tom transfer hook which allows you to upload/download via an inter‐
129           mediate process, using any mechanism you  like  (rather  than  just
130           HTTP).  path  should  point  to the process you wish to invoke. The
131           protocol between the git-lfs client and the custom transfer process
132           is   documented   at   https://github.com/git-lfs/git-lfs/blob/mas
133           ter/docs/custom-transfers.md
134
135           name must be a unique identifier that the LFS  server  understands.
136           When  calling  the  LFS  API the client will include a list of sup‐
137           ported transfer types. If  the  server  also  supports  this  named
138           transfer  type, it will select it and actions returned from the API
139           will be in relation to that transfer type (may not  be  traditional
140           URLs for example). Only if the server accepts name as a transfer it
141           supports will this custom transfer process be invoked.
142
143       ·   lfs.customtransfer.<name>.args
144
145           If the custom transfer process requires any arguments, these can be
146           provided here. This string will be expanded by the shell.
147
148       ·   lfs.customtransfer.<name>.concurrent
149
150           If  true  (the  default),  git-lfs  will invoke the custom transfer
151           process multiple times in parallel,  according  to  lfs.concurrent‐
152           transfers, splitting the transfer workload between the processes.
153
154       ·   lfs.customtransfer.<name>.direction
155
156           Specifies  which  direction  the  custom transfer process supports,
157           either "download", "upload", or "both". The default if  unspecified
158           is "both".
159
160       ·   lfs.transfer.maxretries
161
162           Specifies  how many retries LFS will attempt per OID before marking
163           the transfer as failed. Must be an integer which is at  least  one.
164           If  the value is not an integer, is less than one, or is not given,
165           a value of eight will be used instead.
166
167       ·   lfs.transfer.maxverifies
168
169           Specifies how many verification requests LFS will attempt  per  OID
170           before  marking the transfer as failed, if the object has a verifi‐
171           cation action associated with it. Must be an integer  which  is  at
172           least  one. If the value is not an integer, is less than one, or is
173           not given, a default value of three will be used instead.
174
175
176
177   Push settings
178       ·   lfs.allowincompletepush
179
180           When pushing, allow objects to be  missing  from  the  local  cache
181           without halting a Git push. Default: false.
182
183
184
185   Fetch settings
186       ·   lfs.fetchinclude
187
188           When  fetching, only download objects which match any entry on this
189           comma-separated list of paths/filenames. Wildcard  matching  is  as
190           per git-ignore(1). See git-lfs-fetch(1) for examples.
191
192       ·   lfs.fetchexclude
193
194           When fetching, do not download objects which match any item on this
195           comma-separated list of paths/filenames. Wildcard  matching  is  as
196           per git-ignore(1). See git-lfs-fetch(1) for examples.
197
198       ·   lfs.fetchrecentrefsdays
199
200           If  non-zero,  fetches refs which have commits within N days of the
201           current date. Only local refs are included  unless  lfs.fetchrecen‐
202           tremoterefs  is  true.  Also used as a basis for pruning old files.
203           The default is 7 days.
204
205       ·   lfs.fetchrecentremoterefs
206
207           If true, fetches remote refs (for the remote  you´re  fetching)  as
208           well  as  local  refs in the recent window. This is useful to fetch
209           objects for remote branches you might want to check out later.  The
210           default  is  true;  if  you  set  this to false, fetching for those
211           branches will only occur when you either check them out (losing the
212           advantage  of  fetch  --recent),  or create a tracking local branch
213           separately then fetch again.
214
215       ·   lfs.fetchrecentcommitsdays
216
217           In addition to fetching at refs, also fetches previous changes made
218           within  N  days  of the latest commit on the ref. This is useful if
219           you´re often reviewing recent changes. Also used  as  a  basis  for
220           pruning old files. The default is 0 (no previous changes).
221
222       ·   lfs.fetchrecentalways
223
224           Always operate as if --recent was included in a git lfs fetch call.
225           Default false.
226
227
228
229   Prune settings
230       ·   lfs.pruneoffsetdays
231
232           The number of days added to the lfs.fetchrecent* settings to deter‐
233           mine  what  can  be  pruned.  Default is 3 days, i.e. that anything
234           fetched at the very oldest edge of the ´recent window´ is  eligible
235           for pruning 3 days later.
236
237       ·   lfs.pruneremotetocheck
238
239           Set the remote that LFS files must have been pushed to in order for
240           them to be considered eligible for local pruning. Also  the  remote
241           which is called if --verify-remote is enabled.
242
243       ·   lfs.pruneverifyremotealways
244
245           Always run git lfs prune as if --verify-remote was provided.
246
247
248
249   Extensions
250       ·   lfs.extension.<name>.<setting>
251
252           Git  LFS extensions enable the manipulation of files streams during
253           smudge and clean. name groups the settings for a single  extension,
254           and the settings are:
255
256       ·   clean The command which runs when files are added to the index
257
258       ·   smudge The command which runs when files are written to the working
259           copy
260
261       ·   priority The order of this extension compared to others
262
263
264
265
266
267
268   Other settings
269       ·   lfs.<url>.access
270
271           Note: this setting is normally set by LFS itself on receiving a 401
272           response  (authentication required), you don´t normally need to set
273           it manually.
274
275           If set to "basic" then credentials will be requested before  making
276           batch  requests  to  this url, otherwise a public request will ini‐
277           tially be attempted.
278
279       ·   lfs.<url>.locksverify
280
281           Determines whether locks are checked before Git pushes.  This  pre‐
282           vents  you  from  pushing  changes  to  files that other users have
283           locked. The Git LFS pre-push hook varies its behavior based on  the
284           value of this config key.
285
286       ·   null  -  In  the absence of a value, Git LFS will attempt the call,
287           and warn if it returns an error. If the response is valid, Git  LFS
288           will  set  the  value  to  true, and will halt the push if the user
289           attempts to update a file locked by another  user.  If  the  server
290           returns  a 501 Not Implemented response, Git LFS will set the value
291           to false.
292
293       ·   true - Git LFS will attempt to verify locks, halting the  Git  push
294           if there are any server issues, or if the user attempts to update a
295           file locked by another user.
296
297       ·   false - Git LFS will completely skip the lock check in the pre-push
298           hook. You should set this if you´re not using File Locking, or your
299           Git server verifies locked files on pushes automatically.
300
301
302
303       Supports     URL     config      lookup      as      described      in:
304       https://git-scm.com/docs/git-config#git-config-httplturlgt. To set this
305       value per-host: git config --global lfs.https://github.com/.locksverify
306       [true|false].
307
308       ·   lfs.<url>.contenttype
309
310           Determines  whether Git LFS should attempt to detect an appropriate
311           HTTP Content-Type header when uploading using  the  ´basic´  upload
312           adapter.  If  set  to  false,  the  default header of Content-Type:
313           application/octet-stream is chosen instead. Default: ´true´.
314
315       ·   lfs.skipdownloaderrors
316
317           Causes Git LFS not to abort the smudge filter when a download error
318           is  encountered, which allows actions such as checkout to work when
319           you are unable to download the LFS content. LFS files  which  could
320           not download will contain pointer content instead.
321
322           Note  that  this  will result in git commands which call the smudge
323           filter to report success even in cases  when  LFS  downloads  fail,
324           which may affect scripts.
325
326           You  can  also  set  the  environment  variable  GIT_LFS_SKIP_DOWN‐
327           LOAD_ERRORS=1 to get the same effect.
328
329       ·   GIT_LFS_PROGRESS
330
331           This environment variable causes Git LFS to emit  progress  updates
332           to an absolute file-path on disk when cleaning, smudging, or fetch‐
333           ing.
334
335           Progress is reported periodically in the form of a new  line  being
336           appended  to  the end of the file. Each new line will take the fol‐
337           lowing format:
338
339           <direction> <current>/<total files> <downloaded>/<total> <name>
340
341           Each field is described below:
342
343       ·   direction: The direction of  transfer,  either  "checkout",  "down‐
344           load", or "upload".
345
346       ·   current The index of the currently transferring file.
347
348       ·   total files The estimated count of all files to be transferred.
349
350       ·   downloaded The number of bytes already downloaded.
351
352       ·   total The entire size of the file, in bytes.
353
354       ·   name The name of the file.
355
356
357
358
359       ·   GIT_LFS_FORCE_PROGRESS lfs.forceprogress
360
361           Controls  whether  Git  LFS  will suppress progress status when the
362           standard output stream is not attached to a terminal.  The  default
363           is  false  which  makes Git LFS detect whether stdout is a terminal
364           and suppress progress when it´s not; you can disable this behaviour
365           and force progress status even when standard output stream is not a
366           terminal by setting either variable to 1, ´yes´ or ´true´.
367
368       ·   GIT_LFS_SKIP_SMUDGE
369
370           Sets whether or not Git LFS will skip attempting to convert  point‐
371           ers  of files tracked into their corresponding objects when checked
372           out into a working copy. If ´true´, ´1´, ´on´, or similar, Git  LFS
373           will  skip  the  smudge  process in both git lfs smudge and git lfs
374           filter-process. If unset, or set to ´false´, ´0´, ´off´,  or  simi‐
375           lar, Git LFS will smudge files as normal.
376
377       ·   GIT_LFS_SET_LOCKABLE_READONLY lfs.setlockablereadonly
378
379           These  settings, the first an environment variable and the second a
380           gitconfig setting, control whether files marked  as  ´lockable´  in
381           git  lfs  track  are  made  read-only  in the working copy when not
382           locked by the current user. The default is true;  you  can  disable
383           this behaviour and have all files writeable by setting either vari‐
384           able to 0, ´no´ or ´false´.
385
386       ·   lfs.lockignoredfiles
387
388           This setting controls whether Git LFS will set ignored  files  that
389           match  the lockable pattern read only as well as tracked files. The
390           default is false; you can enable this behavior by setting the vari‐
391           able to 1, ´yes´, or ´true´.
392
393       ·   lfs.defaulttokenttl
394
395           This  setting  sets  a  default token TTL when git-lfs-authenticate
396           does not include the TTL in the JSON response  but  still  enforces
397           it.
398
399           Note  that this is only necessary for larger repositories hosted on
400           LFS servers that don´t include the TTL.
401
402
403

LFSCONFIG

405       The .lfsconfig file in a repository is read and interpreted in the same
406       format as the file stored in .git/config. It allows a subset of keys to
407       be used, including and limited to:
408
409       ·   lfs.allowincompletepush
410
411       ·   lfs.fetchexclude
412
413       ·   lfs.fetchinclude
414
415       ·   lfs.gitprotocol
416
417       ·   lfs.locksverify
418
419       ·   lfs.pushurl
420
421       ·   lfs.url
422
423       ·   lfs.extension.{name}.clean
424
425       ·   lfs.extension.{name}.smudge
426
427       ·   lfs.extension.{name}.priority
428
429       ·   remote.{name}.lfsurl
430
431       ·   lfs.{*}.access
432
433
434
435       The set of keys allowed in this file is restricted  for  security  rea‐
436       sons.
437

EXAMPLES

439       Configure a custom LFS endpoint for your repository:
440
441
442       git      config     -f     .lfsconfig     lfs.url     https://lfs.exam
443       ple.com/foo/bar/info/lfs
444

SEE ALSO

446       git-config(1), git-lfs-install(1), gitattributes(5)
447
448       Part of the git-lfs(1) suite.
449
450
451
452                                  April 2019                 GIT-LFS-CONFIG(5)
Impressum