Git - git Documentation (original) (raw)
A number controlling the amount of output shown by the recursive merge strategy. Overrides merge.verbosity. See git-merge[1]
This environment variable overrides $PAGER
. If it is set to an empty string or to the value "cat", Git will not launch a pager. See also the core.pager
option ingit-config[1].
A number controlling how many seconds to delay before showing optional progress indicators. Defaults to 2.
This environment variable overrides $EDITOR
and $VISUAL
. It is used by several Git commands when, on interactive mode, an editor is to be launched. See also git-var[1]and the core.editor
option in git-config[1].
This environment variable overrides the configured Git editor when editing the todo list of an interactive rebase. See alsogit-rebase[1] and the sequence.editor
option ingit-config[1].
If either of these environment variables is set then _git fetch_and git push will use the specified command instead of _ssh_when they need to connect to a remote system. The command-line parameters passed to the configured command are determined by the ssh variant. See ssh.variant
option ingit-config[1] for details.
$GIT_SSH_COMMAND
takes precedence over $GIT_SSH
, and is interpreted by the shell, which allows additional arguments to be included.$GIT_SSH
on the other hand must be just the path to a program (which can be a wrapper shell script, if additional arguments are needed).
Usually it is easier to configure any desired options through your personal .ssh/config
file. Please consult your ssh documentation for further details.
If this environment variable is set, it overrides Git’s autodetection whether GIT_SSH
/GIT_SSH_COMMAND
/core.sshCommand
refer to OpenSSH, plink or tortoiseplink. This variable overrides the config settingssh.variant
that serves the same purpose.
Setting and exporting this environment variable to any value tells Git not to verify the SSL certificate when fetching or pushing over HTTPS.
Sets the treeish that gitattributes will be read from.
If this environment variable is set, then Git commands which need to acquire passwords or passphrases (e.g. for HTTP or IMAP authentication) will call this program with a suitable prompt as command-line argument and read the password from its STDOUT. See also the core.askPass
option in git-config[1].
If this Boolean environment variable is set to false, git will not prompt on the terminal (e.g., when asking for HTTP authentication).
Take the configuration from the given files instead from global or system-level configuration files. If GIT_CONFIG_SYSTEM
is set, the system config file defined at build time (usually /etc/gitconfig
) will not be read. Likewise, if GIT_CONFIG_GLOBAL
is set, neither$HOME/.gitconfig
nor $XDG_CONFIG_HOME/git/config
will be read. Can be set to /dev/null
to skip reading configuration files of the respective level.
Whether to skip reading settings from the system-wide$(prefix)/etc/gitconfig
file. This Boolean environment variable can be used along with $HOME
and $XDG_CONFIG_HOME
to create a predictable environment for a picky script, or you can set it to true to temporarily avoid using a buggy /etc/gitconfig
file while waiting for someone with sufficient permissions to fix it.
If this Boolean environment variable is set to true, then commands such as git blame (in incremental mode), git rev-list, git log,git check-attr and git check-ignore will force a flush of the output stream after each record have been flushed. If this variable is set to false, the output of these commands will be done using completely buffered I/O. If this environment variable is not set, Git will choose buffered or record-oriented flushing based on whether stdout appears to be redirected to a file or not.
Enables general trace messages, e.g. alias expansion, built-in command execution and external command execution.
If this variable is set to "1", "2" or "true" (comparison is case insensitive), trace messages will be printed to stderr.
If the variable is set to an integer value greater than 2 and lower than 10 (strictly) then Git will interpret this value as an open file descriptor and will try to write the trace messages into this file descriptor.
Alternatively, if the variable is set to an absolute path (starting with a / character), Git will interpret this as a file path and will try to append the trace messages to it.
Unsetting the variable, or setting it to empty, "0" or "false" (case insensitive) disables trace messages.
Enables trace messages for the filesystem monitor extension. See GIT_TRACE
for available trace output options.
Enables trace messages for all accesses to any packs. For each access, the pack file name and an offset in the pack is recorded. This may be helpful for troubleshooting some pack-related performance problems. See GIT_TRACE
for available trace output options.
Enables trace messages for all packets coming in or out of a given program. This can help with debugging object negotiation or other protocol issues. Tracing is turned off at a packet starting with "PACK" (but see GIT_TRACE_PACKFILE
below). See GIT_TRACE
for available trace output options.
Enables tracing of packfiles sent or received by a given program. Unlike other trace output, this trace is verbatim: no headers, and no quoting of binary data. You almost certainly want to direct into a file (e.g.,GIT_TRACE_PACKFILE=/tmp/my.pack
) rather than displaying it on the terminal or mixing it with other trace output.
Note that this is currently only implemented for the client side of clones and fetches.
Enables performance related trace messages, e.g. total execution time of each Git command. See GIT_TRACE
for available trace output options.
Enables trace messages for operations on the ref database. See GIT_TRACE
for available trace output options.
Enables trace messages printing the .git, working tree and current working directory after Git has completed its setup phase. See GIT_TRACE
for available trace output options.
Enables trace messages that can help debugging fetching / cloning of shallow repositories. See GIT_TRACE
for available trace output options.
Enables a curl full trace dump of all incoming and outgoing data, including descriptive information, of the git transport protocol. This is similar to doing curl --trace-ascii
on the command line. See GIT_TRACE
for available trace output options.
When a curl trace is enabled (see GIT_TRACE_CURL
above), do not dump data (that is, only dump info lines and headers).
Enables more detailed trace messages from the "trace2" library. Output from GIT_TRACE2
is a simple text-based format for human readability.
If this variable is set to "1", "2" or "true" (comparison is case insensitive), trace messages will be printed to stderr.
If the variable is set to an integer value greater than 2 and lower than 10 (strictly) then Git will interpret this value as an open file descriptor and will try to write the trace messages into this file descriptor.
Alternatively, if the variable is set to an absolute path (starting with a / character), Git will interpret this as a file path and will try to append the trace messages to it. If the path already exists and is a directory, the trace messages will be written to files (one per process) in that directory, named according to the last component of the SID and an optional counter (to avoid filename collisions).
In addition, if the variable is set toaf_unix:[<socket-type>:]<absolute-pathname>
, Git will try to open the path as a Unix Domain Socket. The socket type can be either stream
or dgram
.
Unsetting the variable, or setting it to empty, "0" or "false" (case insensitive) disables trace messages.
This setting writes a JSON-based format that is suited for machine interpretation. See GIT_TRACE2
for available trace output options andTrace2 documentation for full details.
In addition to the text-based messages available in GIT_TRACE2
, this setting writes a column-based format for understanding nesting regions. See GIT_TRACE2
for available trace output options andTrace2 documentation for full details.
By default, when tracing is activated, Git redacts the values of cookies, the "Authorization:" header, the "Proxy-Authorization:" header and packfile URIs. Set this Boolean environment variable to false to prevent this redaction.
Setting and exporting this environment variable tells Git to ignore replacement refs and do not replace Git objects.
Setting this Boolean environment variable to true will cause Git to treat all pathspecs literally, rather than as glob patterns. For example, running GIT_LITERAL_PATHSPECS=1 git log -- '*.c'
will search for commits that touch the path *.c
, not any paths that the glob *.c
matches. You might want this if you are feeding literal paths to Git (e.g., paths previously given to you bygit ls-tree
, --raw
diff output, etc).
Setting this Boolean environment variable to true will cause Git to treat all pathspecs as glob patterns (aka "glob" magic).
Setting this Boolean environment variable to true will cause Git to treat all pathspecs as literal (aka "literal" magic).
Setting this Boolean environment variable to true will cause Git to treat all pathspecs as case-insensitive.
Setting this Boolean environment variable to true tells Git not to lazily fetch missing objects from the promisor remote on demand.
When a ref is updated, reflog entries are created to keep track of the reason why the ref was updated (which is typically the name of the high-level command that updated the ref), in addition to the old and new values of the ref. A scripted Porcelain command can use set_reflog_action helper function in git-sh-setup
to set its name to this variable when it is invoked as the top level command by the end user, to be recorded in the body of the reflog.
If this Boolean environment variable is set to false, ignore broken or badly named refs when iterating over lists of refs. Normally Git will try to include any such refs, which may cause some operations to fail. This is usually preferable, as potentially destructive operations (e.g.,git-prune[1]) are better off aborting rather than ignoring broken refs (and thus considering the history they point to as not worth saving). The default value is 1
(i.e., be paranoid about detecting and aborting all operations). You should not normally need to set this to 0
, but it may be useful when trying to salvage data from a corrupted repository.
When loading a commit object from the commit-graph, Git performs an existence check on the object in the object database. This is done to avoid issues with stale commit-graphs that contain references to already-deleted commits, but comes with a performance penalty.
The default is "false", which disables the aforementioned behavior. Setting this to "true" enables the existence check so that stale commits will never be returned from the commit-graph at the cost of performance.
If set to a colon-separated list of protocols, behave as ifprotocol.allow
is set to never
, and each of the listed protocols has protocol.<name>.allow
set to always
(overriding any existing configuration). See the description ofprotocol.allow
in git-config[1] for more details.
Set this Boolean environment variable to false to prevent protocols used by fetch/push/clone which are configured to the user
state. This is useful to restrict recursive submodule initialization from an untrusted repository or for programs which feed potentially-untrusted URLS to git commands. Seegit-config[1] for more details.
For internal use only. Used in handshaking the wire protocol. Contains a colon : separated list of keys with optional values_[=]_. Presence of unknown keys and values must be ignored.
Note that servers may need to be configured to allow this variable to pass over some transports. It will be propagated automatically when accessing local repositories (i.e., file://
or a filesystem path), as well as over the git://
protocol. For git-over-http, it should work automatically in most configurations, but see the discussion ingit-http-backend[1]. For git-over-ssh, the ssh server may need to be configured to allow clients to pass this variable (e.g., by usingAcceptEnv GIT_PROTOCOL
with OpenSSH).
This configuration is optional. If the variable is not propagated, then clients will fall back to the original "v0" protocol (but may miss out on some performance improvements or features). This variable currently only affects clones and fetches; it is not yet used for pushes (but may be in the future).
If this Boolean environment variable is set to false, Git will complete any requested operation without performing any optional sub-operations that require taking a lock. For example, this will prevent git status
from refreshing the index as a side effect. This is useful for processes running in the background which do not want to cause lock contention with other operations on the repository. Defaults to 1
.
Windows-only: allow redirecting the standard input/output/error handles to paths specified by the environment variables. This is particularly useful in multi-threaded applications where the canonical way to pass standard handles via CreateProcess()
is not an option because it would require the handles to be marked inheritable (and consequently every spawned process would inherit them, possibly blocking regular Git operations). The primary intended use case is to use named pipes for communication (e.g. \\.\pipe\my-git-stdin-123
).
Two special values are supported: off
will simply close the corresponding standard handle, and if GIT_REDIRECT_STDERR
is2>&1
, standard error will be redirected to the same handle as standard output.
GIT_PRINT_SHA1_ELLIPSIS
(deprecated)
If set to yes
, print an ellipsis following an (abbreviated) SHA-1 value. This affects indications of detached HEADs (git-checkout[1]) and the raw diff output (git-diff[1]). Printing an ellipsis in the cases mentioned is no longer considered adequate and support for it is likely to be removed in the foreseeable future (along with the variable).
If set to 0
, then disable all advice messages. These messages are intended to provide hints to human users that may help them get out of problematic situations or take advantage of new features. Users can disable individual messages using the advice.*
config keys. These messages may be disruptive to tools that execute Git processes, so this variable is available to disable the messages. (The --no-advice
global option is also available, but old Git versions may fail when this option is not understood. The environment variable will be ignored by Git versions that do not understand it.)