Home Explore Blog CI



git

7th chunk of `Documentation/config/core.adoc`
55b8cba27835037dad75a1b1fd2e9d03aeb8d1b1e12ea55b0000000100000fb4
 multiple refs in the repository. True by default.

core.compression::
	An integer -1..9, indicating a default compression level.
	-1 is the zlib default. 0 means no compression,
	and 1..9 are various speed/size tradeoffs, 9 being slowest.
	If set, this provides a default to other compression variables,
	such as `core.looseCompression` and `pack.compression`.

core.looseCompression::
	An integer -1..9, indicating the compression level for objects that
	are not in a pack file. -1 is the zlib default. 0 means no
	compression, and 1..9 are various speed/size tradeoffs, 9 being
	slowest.  If not set,  defaults to core.compression.  If that is
	not set,  defaults to 1 (best speed).

core.packedGitWindowSize::
	Number of bytes of a pack file to map into memory in a
	single mapping operation.  Larger window sizes may allow
	your system to process a smaller number of large pack files
	more quickly.  Smaller window sizes will negatively affect
	performance due to increased calls to the operating system's
	memory manager, but may improve performance when accessing
	a large number of large pack files.
+
Default is 1 MiB if NO_MMAP was set at compile time, otherwise 32
MiB on 32 bit platforms and 1 GiB on 64 bit platforms.  This should
be reasonable for all users/operating systems.  You probably do
not need to adjust this value.
+
Common unit suffixes of 'k', 'm', or 'g' are supported.

core.packedGitLimit::
	Maximum number of bytes to map simultaneously into memory
	from pack files.  If Git needs to access more than this many
	bytes at once to complete an operation it will unmap existing
	regions to reclaim virtual address space within the process.
+
Default is 256 MiB on 32 bit platforms and 32 TiB (effectively
unlimited) on 64 bit platforms.
This should be reasonable for all users/operating systems, except on
the largest projects.  You probably do not need to adjust this value.
+
Common unit suffixes of 'k', 'm', or 'g' are supported.

core.deltaBaseCacheLimit::
	Maximum number of bytes per thread to reserve for caching base objects
	that may be referenced by multiple deltified objects.  By storing the
	entire decompressed base objects in a cache Git is able
	to avoid unpacking and decompressing frequently used base
	objects multiple times.
+
Default is 96 MiB on all platforms.  This should be reasonable
for all users/operating systems, except on the largest projects.
You probably do not need to adjust this value.
+
Common unit suffixes of 'k', 'm', or 'g' are supported.

core.bigFileThreshold::
	The size of files considered "big", which as discussed below
	changes the behavior of numerous git commands, as well as how
	such files are stored within the repository. The default is
	512 MiB. Common unit suffixes of 'k', 'm', or 'g' are
	supported.
+
Files above the configured limit will be:
+
* Stored deflated in packfiles, without attempting delta compression.
+
The default limit is primarily set with this use-case in mind. With it,
most projects will have their source code and other text files delta
compressed, but not larger binary media files.
+
Storing large files without delta compression avoids excessive memory
usage, at the slight expense of increased disk usage.
+
* Will be treated as if they were labeled "binary" (see
  linkgit:gitattributes[5]). e.g. linkgit:git-log[1] and
  linkgit:git-diff[1] will not compute diffs for files above this limit.
+
* Will generally be streamed when written, which avoids excessive
memory usage, at the cost of some fixed overhead. Commands that make
use of this include linkgit:git-archive[1],
linkgit:git-fast-import[1], linkgit:git-index-pack[1],
linkgit:git-unpack-objects[1] and linkgit:git-fsck[1].

core.excludesFile::
	Specifies the pathname to the file that contains patterns to
	describe paths that are not meant to be tracked, in addition
	to `.gitignore` (per-directory) and `.git/info/exclude`.
	Defaults to `$XDG_CONFIG_HOME/git/ignore`.
	If `$XDG_CONFIG_HOME` is either not set or empty, `$HOME/.config/git/ignore`

Title: Git Core Configuration Variables for Performance and Data Management
Summary
This section describes various Git core configuration variables related to compression, memory usage, and data management, including settings for pack file window size, compression levels, cache limits, and file thresholds, which can be used to optimize Git's performance and behavior for different projects and use cases.