Home Explore Blog CI



git

6th chunk of `Documentation/config/core.adoc`
934f847210f6ee44d5580637f8d41a88b7bd0c2d3b71e8c20000000100000fa2
 by the `GIT_WORK_TREE` environment
	variable and the `--work-tree` command-line option.
	The value can be an absolute path or relative to the path to
	the .git directory, which is either specified by --git-dir
	or GIT_DIR, or automatically discovered.
	If --git-dir or GIT_DIR is specified but none of
	--work-tree, GIT_WORK_TREE and core.worktree is specified,
	the current working directory is regarded as the top level
	of your working tree.
+
Note that this variable is honored even when set in a configuration
file in a ".git" subdirectory of a directory and its value differs
from the latter directory (e.g. "/path/to/.git/config" has
core.worktree set to "/different/path"), which is most likely a
misconfiguration.  Running Git commands in the "/path/to" directory will
still use "/different/path" as the root of the work tree and can cause
confusion unless you know what you are doing (e.g. you are creating a
read-only snapshot of the same index to a location different from the
repository's usual working tree).

core.logAllRefUpdates::
	Enable the reflog. Updates to a ref <ref> is logged to the file
	"`$GIT_DIR/logs/<ref>`", by appending the new and old
	SHA-1, the date/time and the reason of the update, but
	only when the file exists.  If this configuration
	variable is set to `true`, missing "`$GIT_DIR/logs/<ref>`"
	file is automatically created for branch heads (i.e. under
	`refs/heads/`), remote refs (i.e. under `refs/remotes/`),
	note refs (i.e. under `refs/notes/`), and the symbolic ref `HEAD`.
	If it is set to `always`, then a missing reflog is automatically
	created for any ref under `refs/`.
+
This information can be used to determine what commit
was the tip of a branch "2 days ago".
+
This value is true by default in a repository that has
a working directory associated with it, and false by
default in a bare repository.

core.repositoryFormatVersion::
	Internal variable identifying the repository format and layout
	version. See linkgit:gitrepository-layout[5].

core.sharedRepository::
	When 'group' (or 'true'), the repository is made shareable between
	several users in a group (making sure all the files and objects are
	group-writable). When 'all' (or 'world' or 'everybody'), the
	repository will be readable by all users, additionally to being
	group-shareable. When 'umask' (or 'false'), Git will use permissions
	reported by umask(2). When '0xxx', where '0xxx' is an octal number,
	files in the repository will have this mode value. '0xxx' will override
	user's umask value (whereas the other options will only override
	requested parts of the user's umask value). Examples: '0660' will make
	the repo read/write-able for the owner and group, but inaccessible to
	others (equivalent to 'group' unless umask is e.g. '0022'). '0640' is a
	repository that is group-readable but not group-writable.
	See linkgit:git-init[1]. False by default.

core.warnAmbiguousRefs::
	If true, Git will warn you if the ref name you passed it is ambiguous
	and might match 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

Title: Git Core Configuration Variables for Logging, Repository Format, and Compression
Summary
This section describes various Git core configuration variables related to logging ref updates, repository format and layout version, shared repository settings, compression levels, and memory mapping for pack files, which can be used to customize Git's behavior, performance, and security in different environments and use cases.