1GIT-VAR(1) Git Manual GIT-VAR(1)
2
3
4
6 git-var - Show a Git logical variable
7
9 git var (-l | <variable>)
10
12 Prints a Git logical variable. Exits with code 1 if the variable has no
13 value.
14
16 -l
17 Display the logical variables. In addition, all the variables of
18 the Git configuration file .git/config are listed as well.
19 (However, the configuration variables listing functionality is
20 deprecated in favor of git config -l.)
21
23 $ git var GIT_AUTHOR_IDENT
24 Eric W. Biederman <ebiederm@lnxi.com> 1121223278 -0600
25
27 GIT_AUTHOR_IDENT
28 The author of a piece of code.
29
30 GIT_COMMITTER_IDENT
31 The person who put a piece of code into Git.
32
33 GIT_EDITOR
34 Text editor for use by Git commands. The value is meant to be
35 interpreted by the shell when it is used. Examples: ~/bin/vi,
36 $SOME_ENVIRONMENT_VARIABLE, "C:\Program Files\Vim\gvim.exe"
37 --nofork. The order of preference is the $GIT_EDITOR environment
38 variable, then core.editor configuration, then $VISUAL, then
39 $EDITOR, and then the default chosen at compile time, which is
40 usually vi.
41
42 GIT_SEQUENCE_EDITOR
43 Text editor used to edit the todo file while running git rebase -i.
44 Like GIT_EDITOR, the value is meant to be interpreted by the shell
45 when it is used. The order of preference is the
46 $GIT_SEQUENCE_EDITOR environment variable, then sequence.editor
47 configuration, and then the value of git var GIT_EDITOR.
48
49 GIT_PAGER
50 Text viewer for use by Git commands (e.g., less). The value is
51 meant to be interpreted by the shell. The order of preference is
52 the $GIT_PAGER environment variable, then core.pager configuration,
53 then $PAGER, and then the default chosen at compile time (usually
54 less).
55
56 GIT_DEFAULT_BRANCH
57 The name of the first branch created in newly initialized
58 repositories.
59
60 GIT_SHELL_PATH
61 The path of the binary providing the POSIX shell for commands which
62 use the shell.
63
64 GIT_ATTR_SYSTEM
65 The path to the system gitattributes(5) file, if one is enabled.
66
67 GIT_ATTR_GLOBAL
68 The path to the global (per-user) gitattributes(5) file.
69
70 GIT_CONFIG_SYSTEM
71 The path to the system configuration file, if one is enabled.
72
73 GIT_CONFIG_GLOBAL
74 The path to the global (per-user) configuration files, if any.
75
76 Most path values contain only one value. However, some can contain
77 multiple values, which are separated by newlines, and are listed in
78 order from highest to lowest priority. Callers should be prepared for
79 any such path value to contain multiple items.
80
81 Note that paths are printed even if they do not exist, but not if they
82 are disabled by other environment variables.
83
85 git-commit-tree(1) git-tag(1) git-config(1)
86
88 Part of the git(1) suite
89
90
91
92Git 2.43.0 11/20/2023 GIT-VAR(1)