]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-var.txt
Merge branch 'jk/ci-retire-allow-ref'
[thirdparty/git.git] / Documentation / git-var.txt
CommitLineData
aed022ab 1git-var(1)
71931c19 2==========
aed022ab
EB
3
4NAME
5----
2de9b711 6git-var - Show a Git logical variable
aed022ab
EB
7
8
9SYNOPSIS
10--------
7791a1d9 11[verse]
e2f4e7e8 12'git var' (-l | <variable>)
aed022ab
EB
13
14DESCRIPTION
15-----------
26b8abc7
SA
16Prints a Git logical variable. Exits with code 1 if the variable has
17no value.
aed022ab 18
df8baa42
JF
19OPTIONS
20-------
21-l::
4ee6bc99 22 Cause the logical variables to be listed. In addition, all the
2de9b711 23 variables of the Git configuration file .git/config are listed
e1cbc46d 24 as well. (However, the configuration variables listing functionality
ca768288 25 is deprecated in favor of `git config -l`.)
aed022ab 26
76a8788c 27EXAMPLES
aed022ab 28--------
b1889c36 29 $ git var GIT_AUTHOR_IDENT
df8baa42 30 Eric W. Biederman <ebiederm@lnxi.com> 1121223278 -0600
aed022ab
EB
31
32
33VARIABLES
76a8788c 34---------
df8baa42 35GIT_AUTHOR_IDENT::
aed022ab
EB
36 The author of a piece of code.
37
df8baa42 38GIT_COMMITTER_IDENT::
2de9b711 39 The person who put a piece of code into Git.
aed022ab 40
44fcb497 41GIT_EDITOR::
2de9b711 42 Text editor for use by Git commands. The value is meant to be
44fcb497
JN
43 interpreted by the shell when it is used. Examples: `~/bin/vi`,
44 `$SOME_ENVIRONMENT_VARIABLE`, `"C:\Program Files\Vim\gvim.exe"
45 --nofork`. The order of preference is the `$GIT_EDITOR`
46 environment variable, then `core.editor` configuration, then
4e0ce4df
JN
47 `$VISUAL`, then `$EDITOR`, and then the default chosen at compile
48 time, which is usually 'vi'.
5b58619a
JN
49ifdef::git-default-editor[]
50 The build you are using chose '{git-default-editor}' as the default.
51endif::git-default-editor[]
44fcb497 52
4c3dd930
SA
53GIT_SEQUENCE_EDITOR::
54 Text editor used to edit the 'todo' file while running `git rebase
55 -i`. Like `GIT_EDITOR`, the value is meant to be interpreted by
56 the shell when it is used. The order of preference is the
57 `$GIT_SEQUENCE_EDITOR` environment variable, then
58 `sequence.editor` configuration, and then the value of `git var
59 GIT_EDITOR`.
60
63618245 61GIT_PAGER::
2de9b711 62 Text viewer for use by Git commands (e.g., 'less'). The value
63618245
JN
63 is meant to be interpreted by the shell. The order of preference
64 is the `$GIT_PAGER` environment variable, then `core.pager`
4e0ce4df
JN
65 configuration, then `$PAGER`, and then the default chosen at
66 compile time (usually 'less').
5b58619a
JN
67ifdef::git-default-pager[]
68 The build you are using chose '{git-default-pager}' as the default.
69endif::git-default-pager[]
63618245 70
e06c9e1d
TW
71GIT_DEFAULT_BRANCH::
72 The name of the first branch created in newly initialized repositories.
73
1e657212 74GIT_SHELL_PATH::
75 The path of the binary providing the POSIX shell for commands which use the shell.
76
576a37fc 77GIT_ATTR_SYSTEM::
78 The path to the system linkgit:gitattributes[5] file, if one is enabled.
79
80GIT_ATTR_GLOBAL::
81 The path to the global (per-user) linkgit:gitattributes[5] file.
82
ed773a18 83GIT_CONFIG_SYSTEM::
84 The path to the system configuration file, if one is enabled.
85
86GIT_CONFIG_GLOBAL::
87 The path to the global (per-user) configuration files, if any.
88
89Most path values contain only one value. However, some can contain multiple
90values, which are separated by newlines, and are listed in order from highest to
91lowest priority. Callers should be prepared for any such path value to contain
92multiple items.
93
94Note that paths are printed even if they do not exist, but not if they are
95disabled by other environment variables.
96
56ae8df5 97SEE ALSO
aed022ab 98--------
5162e697
DM
99linkgit:git-commit-tree[1]
100linkgit:git-tag[1]
101linkgit:git-config[1]
aed022ab 102
aed022ab
EB
103GIT
104---
9e1f0a85 105Part of the linkgit:git[1] suite