'\" t
.\" Title: git-var
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot
.\" Date: 2025-06-15
.\" Manual: Git Manual
.\" Source: Git 2.50.1
.\" Language: English
.\"
.TH "GIT\-VAR" "1" "2025\-06\-15" "Git 2\&.50\&.1" "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
\fBgit\fR \fBvar\fR (\fB\-l\fR | \fI\fR)
.fi
.sp
.SH "DESCRIPTION"
.sp
Prints a Git logical variable\&. Exits with code 1 if the variable has no value\&.
.SH "OPTIONS"
.PP
\fB\-l\fR
.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\fR
\fBconfig\fR
\fB\-l\fR\&.)
.RE
.SH "EXAMPLES"
.sp
.if n \{\
.RS 4
.\}
.nf
$ git var GIT_AUTHOR_IDENT
Eric W\&. Biederman 1121223278 \-0600
.fi
.if n \{\
.RE
.\}
.SH "VARIABLES"
.PP
\fBGIT_AUTHOR_IDENT\fR
.RS 4
The author of a piece of code\&.
.RE
.PP
\fBGIT_COMMITTER_IDENT\fR
.RS 4
The person who put a piece of code into Git\&.
.RE
.PP
\fBGIT_EDITOR\fR
.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, "C:\eProgram
\fBFiles\eVim\egvim\&.exe\fR"
\fB\-\-nofork\fR\&. The order of preference is
\fB$GIT_EDITOR\fR, then
\fBcore\&.editor\fR
configuration value, then
\fB$VISUAL\fR, then
\fB$EDITOR\fR, and then the default chosen at compile time, which is usually
\fIvi\fR\&.
.RE
.PP
\fBGIT_SEQUENCE_EDITOR\fR
.RS 4
Text editor used to edit the
\fItodo\fR
file while running
\fBgit\fR
\fBrebase\fR
\fB\-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
\fB$GIT_SEQUENCE_EDITOR\fR, then
\fBsequence\&.editor\fR
configuration value, and then the value of
\fBgit\fR
\fBvar\fR
\fBGIT_EDITOR\fR\&.
.RE
.PP
\fBGIT_PAGER\fR
.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
\fB$GIT_PAGER\fR, then the value of
\fBcore\&.pager\fR
configuration, then
\fB$PAGER\fR, and then the default chosen at compile time (usually
\fBless\fR)\&.
.RE
.PP
\fBGIT_DEFAULT_BRANCH\fR
.RS 4
The name of the first branch created in newly initialized repositories\&.
.RE
.PP
\fBGIT_SHELL_PATH\fR
.RS 4
The path of the binary providing the POSIX shell for commands which use the shell\&.
.RE
.PP
\fBGIT_ATTR_SYSTEM\fR
.RS 4
The path to the system
\fBgitattributes\fR(5)
file, if one is enabled\&.
.RE
.PP
\fBGIT_ATTR_GLOBAL\fR
.RS 4
The path to the global (per\-user)
\fBgitattributes\fR(5)
file\&.
.RE
.PP
\fBGIT_CONFIG_SYSTEM\fR
.RS 4
The path to the system configuration file, if one is enabled\&.
.RE
.PP
\fBGIT_CONFIG_GLOBAL\fR
.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