interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / Documentation / config / core.adoc

813 lines · 37242 bytes Raw Blame History
1core.fileMode::
2 Tells Git if the executable bit of files in the working tree
3 is to be honored.
4+
5Some filesystems lose the executable bit when a file that is
6marked as executable is checked out, or checks out a
7non-executable file with executable bit on.
8linkgit:git-clone[1] or linkgit:git-init[1] probe the filesystem
9to see if it handles the executable bit correctly
10and this variable is automatically set as necessary.
11+
12A repository, however, may be on a filesystem that handles
13the filemode correctly, and this variable is set to 'true'
14when created, but later may be made accessible from another
15environment that loses the filemode (e.g. exporting ext4 via
16CIFS mount, visiting a Cygwin created repository with
17Git for Windows or Eclipse).
18In such a case it may be necessary to set this variable to 'false'.
19See linkgit:git-update-index[1].
20+
21The default is true (when core.filemode is not specified in the config file).
22
23core.hideDotFiles::
24 (Windows-only) If true, mark newly-created directories and files whose
25 name starts with a dot as hidden. If 'dotGitOnly', only the `.git/`
26 directory is hidden, but no other files starting with a dot. The
27 default mode is 'dotGitOnly'.
28
29core.ignoreCase::
30 Internal variable which enables various workarounds to enable
31 Git to work better on filesystems that are not case sensitive,
32 like APFS, HFS+, FAT, NTFS, etc. For example, if a directory listing
33 finds "makefile" when Git expects "Makefile", Git will assume
34 it is really the same file, and continue to remember it as
35 "Makefile".
36+
37The default is false, except linkgit:git-clone[1] or linkgit:git-init[1]
38will probe and set core.ignoreCase true if appropriate when the repository
39is created.
40+
41Git relies on the proper configuration of this variable for your operating
42and file system. Modifying this value may result in unexpected behavior.
43
44core.precomposeUnicode::
45 This option is only used by Mac OS implementation of Git.
46 When core.precomposeUnicode=true, Git reverts the unicode decomposition
47 of filenames done by Mac OS. This is useful when sharing a repository
48 between Mac OS and Linux or Windows.
49 (Git for Windows 1.7.10 or higher is needed, or Git under cygwin 1.7).
50 When false, file names are handled fully transparent by Git,
51 which is backward compatible with older versions of Git.
52
53core.protectHFS::
54 If set to true, do not allow checkout of paths that would
55 be considered equivalent to `.git` on an HFS+ filesystem.
56 Defaults to `true` on Mac OS, and `false` elsewhere.
57
58core.protectNTFS::
59 If set to true, do not allow checkout of paths that would
60 cause problems with the NTFS filesystem, e.g. conflict with
61 8.3 "short" names.
62 Defaults to `true` on Windows, and `false` elsewhere.
63
64core.fsmonitor::
65 If set to true, enable the built-in file system monitor
66 daemon for this working directory (linkgit:git-fsmonitor{litdd}daemon[1]).
67+
68Like hook-based file system monitors, the built-in file system monitor
69can speed up Git commands that need to refresh the Git index
70(e.g. `git status`) in a working directory with many files. The
71built-in monitor eliminates the need to install and maintain an
72external third-party tool.
73+
74The built-in file system monitor is currently available only on a
75limited set of supported platforms. Currently, this includes Windows
76and MacOS.
77+
78Otherwise, this variable contains the pathname of the "fsmonitor"
79hook command.
80+
81This hook command is used to identify all files that may have changed
82since the requested date/time. This information is used to speed up
83git by avoiding unnecessary scanning of files that have not changed.
84+
85See the "fsmonitor-watchman" section of linkgit:githooks[5].
86+
87Note that if you concurrently use multiple versions of Git, such
88as one version on the command line and another version in an IDE
89tool, that the definition of `core.fsmonitor` was extended to
90allow boolean values in addition to hook pathnames. Git versions
912.35.1 and prior will not understand the boolean values and will
92consider the "true" or "false" values as hook pathnames to be
93invoked. Git versions 2.26 thru 2.35.1 default to hook protocol
94V2 and will fall back to no fsmonitor (full scan). Git versions
95prior to 2.26 default to hook protocol V1 and will silently
96assume there were no changes to report (no scan), so status
97commands may report incomplete results. For this reason, it is
98best to upgrade all of your Git versions before using the built-in
99file system monitor.
100
101core.fsmonitorHookVersion::
102 Sets the protocol version to be used when invoking the
103 "fsmonitor" hook.
104+
105There are currently versions 1 and 2. When this is not set,
106version 2 will be tried first and if it fails then version 1
107will be tried. Version 1 uses a timestamp as input to determine
108which files have changes since that time but some monitors
109like Watchman have race conditions when used with a timestamp.
110Version 2 uses an opaque string so that the monitor can return
111something that can be used to determine what files have changed
112without race conditions.
113
114core.trustctime::
115 If false, the ctime differences between the index and the
116 working tree are ignored; useful when the inode change time
117 is regularly modified by something outside Git (file system
118 crawlers and some backup systems).
119 See linkgit:git-update-index[1]. True by default.
120
121core.useNanosec::
122 If true, use nanosecond precision for ctime and mtime
123 comparisons between the index and the working tree (if Git
124 was compiled to respect this option).
125 This is unsafe on some platforms;
126 see link:technical/racy-git.html[Racy Git]. False by default.
127
128core.splitIndex::
129 If true, the split-index feature of the index will be used.
130 See linkgit:git-update-index[1]. False by default.
131
132core.untrackedCache::
133 Determines what to do about the untracked cache feature of the
134 index. It will be kept, if this variable is unset or set to
135 `keep`. It will automatically be added if set to `true`. And
136 it will automatically be removed, if set to `false`. Before
137 setting it to `true`, you should check that mtime is working
138 properly on your system.
139 See linkgit:git-update-index[1]. `keep` by default, unless
140 `feature.manyFiles` is enabled which sets this setting to
141 `true` by default.
142
143core.checkStat::
144 When missing or is set to `default`, many fields in the stat
145 structure are checked to detect if a file has been modified
146 since Git looked at it. When this configuration variable is
147 set to `minimal`, sub-second part of mtime and ctime, the
148 uid and gid of the owner of the file, the inode number (and
149 the device number, if Git was compiled to use it), are
150 excluded from the check among these fields, leaving only the
151 whole-second part of mtime (and ctime, if `core.trustCtime`
152 is set) and the filesize to be checked.
153+
154There are implementations of Git that do not leave usable values in
155some fields (e.g. JGit); by excluding these fields from the
156comparison, the `minimal` mode may help interoperability when the
157same repository is used by these other systems at the same time.
158
159core.quotePath::
160 Commands that output paths (e.g. 'ls-files', 'diff'), will
161 quote "unusual" characters in the pathname by enclosing the
162 pathname in double-quotes and escaping those characters with
163 backslashes in the same way C escapes control characters (e.g.
164 `\t` for TAB, `\n` for LF, `\\` for backslash) or bytes with
165 values larger than 0x80 (e.g. octal `\302\265` for "micro" in
166 UTF-8). If this variable is set to false, bytes higher than
167 0x80 are not considered "unusual" any more. Double-quotes,
168 backslash and control characters are always escaped regardless
169 of the setting of this variable. A simple space character is
170 not considered "unusual". Many commands can output pathnames
171 completely verbatim using the `-z` option. The default value
172 is true.
173
174core.eol::
175 Sets the line ending type to use in the working directory for
176 files that are marked as text (either by having the `text`
177 attribute set, or by having `text=auto` and Git auto-detecting
178 the contents as text).
179 Alternatives are 'lf', 'crlf' and 'native', which uses the platform's
180 native line ending. The default value is `native`. See
181 linkgit:gitattributes[5] for more information on end-of-line
182 conversion. Note that this value is ignored if `core.autocrlf`
183 is set to `true` or `input`.
184
185core.safecrlf::
186 If true, makes Git check if converting `CRLF` is reversible when
187 end-of-line conversion is active. Git will verify if a command
188 modifies a file in the work tree either directly or indirectly.
189 For example, committing a file followed by checking out the
190 same file should yield the original file in the work tree. If
191 this is not the case for the current setting of
192 `core.autocrlf`, Git will reject the file. The variable can
193 be set to "warn", in which case Git will only warn about an
194 irreversible conversion but continue the operation.
195+
196CRLF conversion bears a slight chance of corrupting data.
197When it is enabled, Git will convert CRLF to LF during commit and LF to
198CRLF during checkout. A file that contains a mixture of LF and
199CRLF before the commit cannot be recreated by Git. For text
200files this is the right thing to do: it corrects line endings
201such that we have only LF line endings in the repository.
202But for binary files that are accidentally classified as text the
203conversion can corrupt data.
204+
205If you recognize such corruption early you can easily fix it by
206setting the conversion type explicitly in .gitattributes. Right
207after committing you still have the original file in your work
208tree and this file is not yet corrupted. You can explicitly tell
209Git that this file is binary and Git will handle the file
210appropriately.
211+
212Unfortunately, the desired effect of cleaning up text files with
213mixed line endings and the undesired effect of corrupting binary
214files cannot be distinguished. In both cases CRLFs are removed
215in an irreversible way. For text files this is the right thing
216to do because CRLFs are line endings, while for binary files
217converting CRLFs corrupts data.
218+
219Note, this safety check does not mean that a checkout will generate a
220file identical to the original file for a different setting of
221`core.eol` and `core.autocrlf`, but only for the current one. For
222example, a text file with `LF` would be accepted with `core.eol=lf`
223and could later be checked out with `core.eol=crlf`, in which case the
224resulting file would contain `CRLF`, although the original file
225contained `LF`. However, in both work trees the line endings would be
226consistent, that is either all `LF` or all `CRLF`, but never mixed. A
227file with mixed line endings would be reported by the `core.safecrlf`
228mechanism.
229
230core.autocrlf::
231 Setting this variable to "true" is the same as setting
232 the `text` attribute to "auto" on all files and core.eol to "crlf".
233 Set to true if you want to have `CRLF` line endings in your
234 working directory and the repository has LF line endings.
235 This variable can be set to 'input',
236 in which case no output conversion is performed.
237
238core.checkRoundtripEncoding::
239 A comma and/or whitespace separated list of encodings that Git
240 performs UTF-8 round trip checks on if they are used in an
241 `working-tree-encoding` attribute (see linkgit:gitattributes[5]).
242 The default value is `SHIFT-JIS`.
243
244core.symlinks::
245 If false, symbolic links are checked out as small plain files that
246 contain the link text. linkgit:git-update-index[1] and
247 linkgit:git-add[1] will not change the recorded type to regular
248 file. Useful on filesystems like FAT that do not support
249 symbolic links.
250+
251The default is true, except linkgit:git-clone[1] or linkgit:git-init[1]
252will probe and set core.symlinks false if appropriate when the repository
253is created.
254
255core.gitProxy::
256 A "proxy command" to execute (as 'command host port') instead
257 of establishing direct connection to the remote server when
258 using the Git protocol for fetching. If the variable value is
259 in the "COMMAND for DOMAIN" format, the command is applied only
260 on hostnames ending with the specified domain string. This variable
261 may be set multiple times and is matched in the given order;
262 the first match wins.
263+
264Can be overridden by the `GIT_PROXY_COMMAND` environment variable
265(which always applies universally, without the special "for"
266handling).
267+
268The special string `none` can be used as the proxy command to
269specify that no proxy be used for a given domain pattern.
270This is useful for excluding servers inside a firewall from
271proxy use, while defaulting to a common proxy for external domains.
272
273core.sshCommand::
274 If this variable is set, `git fetch` and `git push` will
275 use the specified command instead of `ssh` when they need to
276 connect to a remote system. The command is in the same form as
277 the `GIT_SSH_COMMAND` environment variable and is overridden
278 when the environment variable is set.
279
280core.ignoreStat::
281 If true, Git will avoid using lstat() calls to detect if files have
282 changed by setting the "assume-unchanged" bit for those tracked files
283 which it has updated identically in both the index and working tree.
284+
285When files are modified outside of Git, the user will need to stage
286the modified files explicitly (e.g. see 'Examples' section in
287linkgit:git-update-index[1]).
288Git will not normally detect changes to those files.
289+
290This is useful on systems where lstat() calls are very slow, such as
291CIFS/Microsoft Windows.
292+
293False by default.
294
295core.preferSymlinkRefs::
296 Instead of the default "symref" format for HEAD
297 and other symbolic reference files, use symbolic links.
298 This is sometimes needed to work with old scripts that
299 expect HEAD to be a symbolic link.
300+
301This configuration is deprecated and will be removed in Git 3.0. Symbolic refs
302will always be written as textual symrefs.
303
304core.alternateRefsCommand::
305 When advertising tips of available history from an alternate, use the shell to
306 execute the specified command instead of linkgit:git-for-each-ref[1]. The
307 first argument is the absolute path of the alternate. Output must contain one
308 hex object id per line (i.e., the same as produced by `git for-each-ref
309 --format='%(objectname)'`).
310+
311Note that you cannot generally put `git for-each-ref` directly into the config
312value, as it does not take a repository path as an argument (but you can wrap
313the command above in a shell script).
314
315core.alternateRefsPrefixes::
316 When listing references from an alternate, list only references that begin
317 with the given prefix. Prefixes match as if they were given as arguments to
318 linkgit:git-for-each-ref[1]. To list multiple prefixes, separate them with
319 whitespace. If `core.alternateRefsCommand` is set, setting
320 `core.alternateRefsPrefixes` has no effect.
321
322core.bare::
323 If true this repository is assumed to be 'bare' and has no
324 working directory associated with it. If this is the case a
325 number of commands that require a working directory will be
326 disabled, such as linkgit:git-add[1] or linkgit:git-merge[1].
327+
328This setting is automatically guessed by linkgit:git-clone[1] or
329linkgit:git-init[1] when the repository was created. By default a
330repository that ends in "/.git" is assumed to be not bare (bare =
331false), while all other repositories are assumed to be bare (bare
332= true).
333
334core.worktree::
335 Set the path to the root of the working tree.
336 If `GIT_COMMON_DIR` environment variable is set, core.worktree
337 is ignored and not used for determining the root of working tree.
338 This can be overridden by the `GIT_WORK_TREE` environment
339 variable and the `--work-tree` command-line option.
340 The value can be an absolute path or relative to the path to
341 the .git directory, which is either specified by --git-dir
342 or GIT_DIR, or automatically discovered.
343 If --git-dir or GIT_DIR is specified but none of
344 --work-tree, GIT_WORK_TREE and core.worktree is specified,
345 the current working directory is regarded as the top level
346 of your working tree.
347+
348Note that this variable is honored even when set in a configuration
349file in a ".git" subdirectory of a directory and its value differs
350from the latter directory (e.g. "/path/to/.git/config" has
351core.worktree set to "/different/path"), which is most likely a
352misconfiguration. Running Git commands in the "/path/to" directory will
353still use "/different/path" as the root of the work tree and can cause
354confusion unless you know what you are doing (e.g. you are creating a
355read-only snapshot of the same index to a location different from the
356repository's usual working tree).
357
358core.lockfilePid::
359 If true, Git will create a PID file alongside lock files. When a
360 lock acquisition fails and a PID file exists, Git can provide
361 additional diagnostic information about the process holding the
362 lock, including whether it is still running. Defaults to `false`.
363+
364The PID file is named by inserting `~pid` before the `.lock` suffix.
365For example, if the lock file is `index.lock`, the PID file will be
366`index~pid.lock`. The file contains a single line in the format
367`pid <value>` followed by a newline.
368
369core.logAllRefUpdates::
370 Enable the reflog. Updates to a ref <ref> is logged to the file
371 "`$GIT_DIR/logs/<ref>`", by appending the new and old
372 SHA-1, the date/time and the reason of the update, but
373 only when the file exists. If this configuration
374 variable is set to `true`, missing "`$GIT_DIR/logs/<ref>`"
375 file is automatically created for branch heads (i.e. under
376 `refs/heads/`), remote refs (i.e. under `refs/remotes/`),
377 note refs (i.e. under `refs/notes/`), and the symbolic ref `HEAD`.
378 If it is set to `always`, then a missing reflog is automatically
379 created for any ref under `refs/`.
380+
381This information can be used to determine what commit
382was the tip of a branch "2 days ago".
383+
384This value is true by default in a repository that has
385a working directory associated with it, and false by
386default in a bare repository.
387
388core.repositoryFormatVersion::
389 Internal variable identifying the repository format and layout
390 version. See linkgit:gitrepository-layout[5].
391
392core.sharedRepository::
393 When 'group' (or 'true'), the repository is made shareable between
394 several users in a group (making sure all the files and objects are
395 group-writable). When 'all' (or 'world' or 'everybody'), the
396 repository will be readable by all users, additionally to being
397 group-shareable. When 'umask' (or 'false'), Git will use permissions
398 reported by umask(2). When '0xxx', where '0xxx' is an octal number,
399 files in the repository will have this mode value. '0xxx' will override
400 user's umask value (whereas the other options will only override
401 requested parts of the user's umask value). Examples: '0660' will make
402 the repo read/write-able for the owner and group, but inaccessible to
403 others (equivalent to 'group' unless umask is e.g. '0022'). '0640' is a
404 repository that is group-readable but not group-writable.
405 See linkgit:git-init[1]. False by default.
406
407core.warnAmbiguousRefs::
408 If true, Git will warn you if the ref name you passed it is ambiguous
409 and might match multiple refs in the repository. True by default.
410
411core.compression::
412 An integer -1..9, indicating a default compression level.
413 -1 is the zlib default. 0 means no compression,
414 and 1..9 are various speed/size tradeoffs, 9 being slowest.
415 If set, this provides a default to other compression variables,
416 such as `core.looseCompression` and `pack.compression`.
417
418core.looseCompression::
419 An integer -1..9, indicating the compression level for objects that
420 are not in a pack file. -1 is the zlib default. 0 means no
421 compression, and 1..9 are various speed/size tradeoffs, 9 being
422 slowest. If not set, defaults to core.compression. If that is
423 not set, defaults to 1 (best speed).
424
425core.packedGitWindowSize::
426 Number of bytes of a pack file to map into memory in a
427 single mapping operation. Larger window sizes may allow
428 your system to process a smaller number of large pack files
429 more quickly. Smaller window sizes will negatively affect
430 performance due to increased calls to the operating system's
431 memory manager, but may improve performance when accessing
432 a large number of large pack files.
433+
434Default is 1 MiB if NO_MMAP was set at compile time, otherwise 32
435MiB on 32 bit platforms and 1 GiB on 64 bit platforms. This should
436be reasonable for all users/operating systems. You probably do
437not need to adjust this value.
438+
439Common unit suffixes of 'k', 'm', or 'g' are supported.
440
441core.packedGitLimit::
442 Maximum number of bytes to map simultaneously into memory
443 from pack files. If Git needs to access more than this many
444 bytes at once to complete an operation it will unmap existing
445 regions to reclaim virtual address space within the process.
446+
447Default is 256 MiB on 32 bit platforms and 32 TiB (effectively
448unlimited) on 64 bit platforms.
449This should be reasonable for all users/operating systems, except on
450the largest projects. You probably do not need to adjust this value.
451+
452Common unit suffixes of 'k', 'm', or 'g' are supported.
453
454core.deltaBaseCacheLimit::
455 Maximum number of bytes per thread to reserve for caching base objects
456 that may be referenced by multiple deltified objects. By storing the
457 entire decompressed base objects in a cache Git is able
458 to avoid unpacking and decompressing frequently used base
459 objects multiple times.
460+
461Default is 96 MiB on all platforms. This should be reasonable
462for all users/operating systems, except on the largest projects.
463You probably do not need to adjust this value.
464+
465Common unit suffixes of 'k', 'm', or 'g' are supported.
466
467core.bigFileThreshold::
468 The size of files considered "big", which as discussed below
469 changes the behavior of numerous git commands, as well as how
470 such files are stored within the repository. The default is
471 512 MiB. Common unit suffixes of 'k', 'm', or 'g' are
472 supported.
473+
474Files above the configured limit will be:
475+
476* Stored deflated in packfiles, without attempting delta compression.
477+
478The default limit is primarily set with this use-case in mind. With it,
479most projects will have their source code and other text files delta
480compressed, but not larger binary media files.
481+
482Storing large files without delta compression avoids excessive memory
483usage, at the slight expense of increased disk usage.
484+
485* Will be treated as if they were labeled "binary" (see
486 linkgit:gitattributes[5]). e.g. linkgit:git-log[1] and
487 linkgit:git-diff[1] will not compute diffs for files above this limit.
488+
489* Will generally be streamed when written, which avoids excessive
490memory usage, at the cost of some fixed overhead. Commands that make
491use of this include linkgit:git-archive[1],
492linkgit:git-fast-import[1], linkgit:git-index-pack[1],
493linkgit:git-unpack-objects[1] and linkgit:git-fsck[1].
494
495core.excludesFile::
496 Specifies the pathname to the file that contains patterns to
497 describe paths that are not meant to be tracked, in addition
498 to `.gitignore` (per-directory) and `.git/info/exclude`.
499 Defaults to `$XDG_CONFIG_HOME/git/ignore`.
500 If `$XDG_CONFIG_HOME` is either not set or empty, `$HOME/.config/git/ignore`
501 is used instead. See linkgit:gitignore[5].
502
503core.askPass::
504 Some commands (e.g. svn and http interfaces) that interactively
505 ask for a password can be told to use an external program given
506 via the value of this variable. Can be overridden by the `GIT_ASKPASS`
507 environment variable. If not set, fall back to the value of the
508 `SSH_ASKPASS` environment variable or, failing that, a simple password
509 prompt. The external program shall be given a suitable prompt as
510 command-line argument and write the password on its STDOUT.
511
512core.attributesFile::
513 Specifies the pathname to the file that contains attributes (see
514 linkgit:gitattributes[5]), in addition to `.gitattributes` (per-directory)
515 and `.git/info/attributes`. Its default value is
516 `$XDG_CONFIG_HOME/git/attributes`. If `$XDG_CONFIG_HOME` is either not
517 set or empty, `$HOME/.config/git/attributes` is used instead.
518
519core.hooksPath::
520 By default Git will look for your hooks in the
521 `$GIT_DIR/hooks` directory. Set this to different path,
522 e.g. `/etc/git/hooks`, and Git will try to find your hooks in
523 that directory, e.g. `/etc/git/hooks/pre-receive` instead of
524 in `$GIT_DIR/hooks/pre-receive`.
525+
526The path can be either absolute or relative. A relative path is
527taken as relative to the directory where the hooks are run (see
528the "DESCRIPTION" section of linkgit:githooks[5]).
529+
530This configuration variable is useful in cases where you'd like to
531centrally configure your Git hooks instead of configuring them on a
532per-repository basis, or as a more flexible and centralized
533alternative to having an `init.templateDir` where you've changed
534default hooks.
535+
536You can also disable all hooks entirely by setting `core.hooksPath`
537to `/dev/null`. This is usually only advisable for expert users and
538on a per-command basis using configuration parameters of the form
539`git -c core.hooksPath=/dev/null ...`.
540
541core.editor::
542 Commands such as `commit` and `tag` that let you edit
543 messages by launching an editor use the value of this
544 variable when it is set, and the environment variable
545 `GIT_EDITOR` is not set. See linkgit:git-var[1].
546
547core.commentChar::
548core.commentString::
549 Commands such as `commit` and `tag` that let you edit
550 messages consider a line that begins with this character
551 commented, and removes them after the editor returns
552 (default '#').
553+
554ifndef::with-breaking-changes[]
555If set to "auto", `git-commit` will select a character that is not
556the beginning character of any line in existing commit messages.
557Support for this value is deprecated and will be removed in Git 3.0
558due to the following limitations:
559+
560--
561* It is incompatible with adding comments in a commit message
562 template. This includes the conflicts comments added to
563 the commit message by `cherry-pick`, `merge`, `rebase` and
564 `revert`.
565* It is incompatible with adding comments to the commit message
566 in the `prepare-commit-msg` hook.
567* It is incompatible with the `fixup` and `squash` commands when
568 rebasing,
569* It is not respected by `git notes`
570--
571+
572endif::with-breaking-changes[]
573Note that these two variables are aliases of each other, and in modern
574versions of Git you are free to use a string (e.g., `//` or `⁑⁕⁑`) with
575`commentChar`. Versions of Git prior to v2.45.0 will ignore
576`commentString` but will reject a value of `commentChar` that consists
577of more than a single ASCII byte. If you plan to use your config with
578older and newer versions of Git, you may want to specify both:
579+
580 [core]
581 # single character for older versions
582 commentChar = "#"
583 # string for newer versions (which will override commentChar
584 # because it comes later in the file)
585 commentString = "//"
586
587core.filesRefLockTimeout::
588 The length of time, in milliseconds, to retry when trying to
589 lock an individual reference. Value 0 means not to retry at
590 all; -1 means to try indefinitely. Default is 100 (i.e.,
591 retry for 100ms).
592
593core.packedRefsTimeout::
594 The length of time, in milliseconds, to retry when trying to
595 lock the `packed-refs` file. Value 0 means not to retry at
596 all; -1 means to try indefinitely. Default is 1000 (i.e.,
597 retry for 1 second).
598
599core.configLockTimeout::
600 The length of time, in milliseconds, to retry when trying to
601 lock a configuration file for writing. Value 0 means not to
602 retry at all; -1 means to try indefinitely. Default is 1000
603 (i.e., retry for 1 second). This is read from the configuration
604 that is already on disk before the lock is taken, so it can be
605 set persistently like any other option.
606
607core.pager::
608 Text viewer for use by Git commands (e.g., 'less'). The value
609 is meant to be interpreted by the shell. The order of preference
610 is the `$GIT_PAGER` environment variable, then `core.pager`
611 configuration, then `$PAGER`, and then the default chosen at
612 compile time (usually 'less').
613+
614When the `LESS` environment variable is unset, Git sets it to `FRX`
615(if `LESS` environment variable is set, Git does not change it at
616all). If you want to selectively override Git's default setting
617for `LESS`, you can set `core.pager` to e.g. `less -S`. This will
618be passed to the shell by Git, which will translate the final
619command to `LESS=FRX less -S`. The environment does not set the
620`S` option but the command line does, instructing less to truncate
621long lines. Similarly, setting `core.pager` to `less -+F` will
622deactivate the `F` option specified by the environment from the
623command-line, deactivating the "quit if one screen" behavior of
624`less`.
625+
626Another way to deactivate an option is prefixing `core.pager` with
627`LESS="RX"` to remove `-F` or `LESS=""` to override all options.
628This is useful if the `core.pager` command eventually runs `less` or
629a command which respects the `LESS` environment variable but lacks
630command line options to override `LESS` options.
631+
632One can specifically activate some flags for particular commands: for
633example, setting `pager.blame` to `less -S` enables line truncation
634only for `git blame`.
635+
636Likewise, when the `LV` environment variable is unset, Git sets it
637to `-c`. You can override this setting by exporting `LV` with
638another value or setting `core.pager` to `lv +c`.
639
640core.whitespace::
641 A comma separated list of common whitespace problems to
642 notice. 'git diff' will use `color.diff.whitespace` to
643 highlight them, and 'git apply --whitespace=error' will
644 consider them as errors. You can prefix `-` to disable
645 any of them (e.g. `-trailing-space`):
646+
647* `blank-at-eol` treats trailing whitespaces at the end of the line
648 as an error (enabled by default).
649* `space-before-tab` treats a space character that appears immediately
650 before a tab character in the initial indent part of the line as an
651 error (enabled by default).
652* `indent-with-non-tab` treats a line that is indented with space
653 characters instead of the equivalent tabs as an error (not enabled by
654 default).
655* `tab-in-indent` treats a tab character in the initial indent part of
656 the line as an error (not enabled by default).
657* `blank-at-eof` treats blank lines added at the end of file as an error
658 (enabled by default).
659* `trailing-space` is a short-hand to cover both `blank-at-eol` and
660 `blank-at-eof`.
661* `cr-at-eol` treats a carriage-return at the end of line as
662 part of the line terminator, i.e. with it, `trailing-space`
663 does not trigger if the character before such a carriage-return
664 is not a whitespace (not enabled by default).
665* `incomplete-line` treats the last line of a file that is missing the
666 newline at the end as an error (not enabled by default).
667* `tabwidth=<n>` tells how many character positions a tab occupies; this
668 is relevant for `indent-with-non-tab` and when Git fixes `tab-in-indent`
669 errors. The default tab width is 8. Allowed values are 1 to 63.
670
671core.fsync::
672 A comma-separated list of components of the repository that
673 should be hardened via the core.fsyncMethod when created or
674 modified. You can disable hardening of any component by
675 prefixing it with a '-'. Items that are not hardened may be
676 lost in the event of an unclean system shutdown. Unless you
677 have special requirements, it is recommended that you leave
678 this option empty or pick one of `committed`, `added`,
679 or `all`.
680+
681When this configuration is encountered, the set of components starts with
682the platform default value, disabled components are removed, and additional
683components are added. `none` resets the state so that the platform default
684is ignored.
685+
686The empty string resets the fsync configuration to the platform
687default. The default on most platforms is equivalent to
688`core.fsync=committed,-loose-object`, which has good performance,
689but risks losing recent work in the event of an unclean system shutdown.
690+
691* `none` clears the set of fsynced components.
692* `loose-object` hardens objects added to the repo in loose-object form.
693* `pack` hardens objects added to the repo in packfile form.
694* `pack-metadata` hardens packfile bitmaps and indexes.
695* `commit-graph` hardens the commit-graph file.
696* `index` hardens the index when it is modified.
697* `objects` is an aggregate option that is equivalent to
698 `loose-object,pack`.
699* `reference` hardens references modified in the repo.
700* `derived-metadata` is an aggregate option that is equivalent to
701 `pack-metadata,commit-graph`.
702* `committed` is an aggregate option that is currently equivalent to
703 `objects`. This mode sacrifices some performance to ensure that work
704 that is committed to the repository with `git commit` or similar commands
705 is hardened.
706* `added` is an aggregate option that is currently equivalent to
707 `committed,index`. This mode sacrifices additional performance to
708 ensure that the results of commands like `git add` and similar operations
709 are hardened.
710* `all` is an aggregate option that syncs all individual components above.
711
712core.fsyncMethod::
713 A value indicating the strategy Git will use to harden repository data
714 using fsync and related primitives.
715+
716* `fsync` uses the fsync() system call or platform equivalents.
717* `writeout-only` issues pagecache writeback requests, but depending on the
718 filesystem and storage hardware, data added to the repository may not be
719 durable in the event of a system crash. This is the default mode on macOS.
720* `batch` enables a mode that uses writeout-only flushes to stage multiple
721 updates in the disk writeback cache and then does a single full fsync of
722 a dummy file to trigger the disk cache flush at the end of the operation.
723+
724Currently `batch` mode only applies to loose-object files. Other repository
725data is made durable as if `fsync` was specified. This mode is expected to
726be as safe as `fsync` on macOS for repos stored on HFS+ or APFS filesystems
727and on Windows for repos stored on NTFS or ReFS filesystems.
728
729core.fsyncObjectFiles::
730 This boolean will enable 'fsync()' when writing object files.
731 This setting is deprecated. Use core.fsync instead.
732+
733This setting affects data added to the Git repository in loose-object
734form. When set to true, Git will issue an fsync or similar system call
735to flush caches so that loose-objects remain consistent in the face
736of a unclean system shutdown.
737
738core.preloadIndex::
739 Enable parallel index preload for operations like 'git diff'
740+
741This can speed up operations like 'git diff' and 'git status' especially
742on filesystems like NFS that have weak caching semantics and thus
743relatively high IO latencies. When enabled, Git will do the
744index comparison to the filesystem data in parallel, allowing
745overlapping IO's. Defaults to true.
746
747core.unsetenvvars::
748 Windows-only: comma-separated list of environment variables'
749 names that need to be unset before spawning any other process.
750 Defaults to `PERL5LIB` to account for the fact that Git for
751 Windows insists on using its own Perl interpreter.
752
753core.createObject::
754 You can set this to 'link', in which case a hardlink followed by
755 a delete of the source are used to make sure that object creation
756 will not overwrite existing objects.
757+
758On some file system/operating system combinations, this is unreliable.
759Set this config setting to 'rename' there; however, this will remove the
760check that makes sure that existing object files will not get overwritten.
761
762core.notesRef::
763 When showing commit messages, also show notes which are stored in
764 the given ref. The ref must be fully qualified. If the given
765 ref does not exist, it is not an error but means that no
766 notes should be printed.
767+
768This setting defaults to "refs/notes/commits", and it can be overridden by
769the `GIT_NOTES_REF` environment variable. See linkgit:git-notes[1].
770
771core.commitGraph::
772 If true, then git will read the commit-graph file (if it exists)
773 to parse the graph structure of commits. Defaults to true. See
774 linkgit:git-commit-graph[1] for more information.
775
776core.useReplaceRefs::
777 If set to `false`, behave as if the `--no-replace-objects`
778 option was given on the command line. See linkgit:git[1] and
779 linkgit:git-replace[1] for more information.
780
781core.multiPackIndex::
782 Use the multi-pack-index file to track multiple packfiles using a
783 single index. See linkgit:git-multi-pack-index[1] for more
784 information. Defaults to true.
785
786core.sparseCheckout::
787 Enable "sparse checkout" feature. See linkgit:git-sparse-checkout[1]
788 for more information.
789
790core.sparseCheckoutCone::
791 Enables the "cone mode" of the sparse checkout feature. When the
792 sparse-checkout file contains a limited set of patterns, this
793 mode provides significant performance advantages. The "non-cone
794 mode" can be requested to allow specifying more flexible
795 patterns by setting this variable to 'false'. See
796 linkgit:git-sparse-checkout[1] for more information.
797
798core.abbrev::
799 Set the length object names are abbreviated to. If
800 unspecified or set to "auto", an appropriate value is
801 computed based on the approximate number of packed objects
802 in your repository, which hopefully is enough for
803 abbreviated object names to stay unique for some time.
804 If set to "no", no abbreviation is made and the object names
805 are shown in their full length.
806 The minimum length is 4.
807
808core.maxTreeDepth::
809 The maximum depth Git is willing to recurse while traversing a
810 tree (e.g., "a/b/cde/f" has a depth of 4). This is a fail-safe
811 to allow Git to abort cleanly, and should not generally need to
812 be adjusted. When Git is compiled with MSVC, the default is 512.
813 Otherwise, the default is 2048.