summaryrefslogtreecommitdiffstats
path: root/man1/git-var.1
blob: dace1d6a1aa07c72397e90ba4112de91ef327dd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
'\" t
.\"     Title: git-var
.\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 2024-04-23
.\"    Manual: Git Manual
.\"    Source: Git 2.45.0.rc0.48.g10f1281498
.\"  Language: English
.\"
.TH "GIT\-VAR" "1" "2024\-04\-23" "Git 2\&.45\&.0\&.rc0\&.48\&.g1" "Git Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
git-var \- Show a Git logical variable
.SH "SYNOPSIS"
.sp
.nf
\fIgit var\fR (\-l | <variable>)
.fi
.sp
.SH "DESCRIPTION"
.sp
Prints a Git logical variable\&. Exits with code 1 if the variable has no value\&.
.SH "OPTIONS"
.PP
\-l
.RS 4
Display the logical variables\&. In addition, all the variables of the Git configuration file \&.git/config are listed as well\&. (However, the configuration variables listing functionality is deprecated in favor of
\fBgit config \-l\fR\&.)
.RE
.SH "EXAMPLES"
.sp
.if n \{\
.RS 4
.\}
.nf
$ git var GIT_AUTHOR_IDENT
Eric W\&. Biederman <ebiederm@lnxi\&.com> 1121223278 \-0600
.fi
.if n \{\
.RE
.\}
.SH "VARIABLES"
.PP
GIT_AUTHOR_IDENT
.RS 4
The author of a piece of code\&.
.RE
.PP
GIT_COMMITTER_IDENT
.RS 4
The person who put a piece of code into Git\&.
.RE
.PP
GIT_EDITOR
.RS 4
Text editor for use by Git commands\&. The value is meant to be interpreted by the shell when it is used\&. Examples:
\fB~/bin/vi\fR,
\fB$SOME_ENVIRONMENT_VARIABLE\fR,
\fB"C:\eProgram Files\eVim\egvim\&.exe" \-\-nofork\fR\&. The order of preference is the
\fB$GIT_EDITOR\fR
environment variable, then
\fBcore\&.editor\fR
configuration, then
\fB$VISUAL\fR, then
\fB$EDITOR\fR, and then the default chosen at compile time, which is usually
\fIvi\fR\&.
.RE
.PP
GIT_SEQUENCE_EDITOR
.RS 4
Text editor used to edit the
\fItodo\fR
file while running
\fBgit rebase \-i\fR\&. Like
\fBGIT_EDITOR\fR, the value is meant to be interpreted by the shell when it is used\&. The order of preference is the
\fB$GIT_SEQUENCE_EDITOR\fR
environment variable, then
\fBsequence\&.editor\fR
configuration, and then the value of
\fBgit var GIT_EDITOR\fR\&.
.RE
.PP
GIT_PAGER
.RS 4
Text viewer for use by Git commands (e\&.g\&.,
\fIless\fR)\&. The value is meant to be interpreted by the shell\&. The order of preference is the
\fB$GIT_PAGER\fR
environment variable, then
\fBcore\&.pager\fR
configuration, then
\fB$PAGER\fR, and then the default chosen at compile time (usually
\fIless\fR)\&.
.RE
.PP
GIT_DEFAULT_BRANCH
.RS 4
The name of the first branch created in newly initialized repositories\&.
.RE
.PP
GIT_SHELL_PATH
.RS 4
The path of the binary providing the POSIX shell for commands which use the shell\&.
.RE
.PP
GIT_ATTR_SYSTEM
.RS 4
The path to the system
\fBgitattributes\fR(5)
file, if one is enabled\&.
.RE
.PP
GIT_ATTR_GLOBAL
.RS 4
The path to the global (per\-user)
\fBgitattributes\fR(5)
file\&.
.RE
.PP
GIT_CONFIG_SYSTEM
.RS 4
The path to the system configuration file, if one is enabled\&.
.RE
.PP
GIT_CONFIG_GLOBAL
.RS 4
The path to the global (per\-user) configuration files, if any\&.
.RE
.sp
Most path values contain only one value\&. However, some can contain multiple values, which are separated by newlines, and are listed in order from highest to lowest priority\&. Callers should be prepared for any such path value to contain multiple items\&.
.sp
Note that paths are printed even if they do not exist, but not if they are disabled by other environment variables\&.
.SH "SEE ALSO"
.sp
\fBgit-commit-tree\fR(1) \fBgit-tag\fR(1) \fBgit-config\fR(1)
.SH "GIT"
.sp
Part of the \fBgit\fR(1) suite