blob: f40202b8e3ab521ea22c78986d3bf5bb44a67f09 [file] [log] [blame]
Eric W. Biedermanaed022a2005-07-14 18:55:09 -06001git-var(1)
Linus Torvalds71931c12005-07-15 14:57:09 -07002==========
Eric W. Biedermanaed022a2005-07-14 18:55:09 -06003
4NAME
5----
Thomas Ackermann2de9b712013-01-21 20:17:53 +01006git-var - Show a Git logical variable
Eric W. Biedermanaed022a2005-07-14 18:55:09 -06007
8
9SYNOPSIS
10--------
Martin von Zweigbergk7791a1d2011-07-01 22:38:26 -040011[verse]
Ævar Arnfjörð Bjarmasone2f4e7e2022-10-13 17:39:06 +020012'git var' (-l | <variable>)
Eric W. Biedermanaed022a2005-07-14 18:55:09 -060013
14DESCRIPTION
15-----------
Sean Allred26b8abc2022-11-26 14:17:56 +000016Prints a Git logical variable. Exits with code 1 if the variable has
17no value.
Eric W. Biedermanaed022a2005-07-14 18:55:09 -060018
Jonas Fonsecadf8baa42005-10-03 19:16:30 +020019OPTIONS
20-------
21-l::
Petr Baudis4ee6bc92006-04-25 00:59:28 +020022 Cause the logical variables to be listed. In addition, all the
Thomas Ackermann2de9b712013-01-21 20:17:53 +010023 variables of the Git configuration file .git/config are listed
Petr Baudise1cbc462006-04-25 00:59:30 +020024 as well. (However, the configuration variables listing functionality
Thomas Rastca768282010-01-07 17:49:12 +010025 is deprecated in favor of `git config -l`.)
Eric W. Biedermanaed022a2005-07-14 18:55:09 -060026
Nguyễn Thái Ngọc Duy76a87882018-04-30 17:35:33 +020027EXAMPLES
Eric W. Biedermanaed022a2005-07-14 18:55:09 -060028--------
Jonathan Niederb1889c32008-06-30 01:09:04 -050029 $ git var GIT_AUTHOR_IDENT
Jonas Fonsecadf8baa42005-10-03 19:16:30 +020030 Eric W. Biederman <ebiederm@lnxi.com> 1121223278 -0600
Eric W. Biedermanaed022a2005-07-14 18:55:09 -060031
32
33VARIABLES
Nguyễn Thái Ngọc Duy76a87882018-04-30 17:35:33 +020034---------
Jonas Fonsecadf8baa42005-10-03 19:16:30 +020035GIT_AUTHOR_IDENT::
Eric W. Biedermanaed022a2005-07-14 18:55:09 -060036 The author of a piece of code.
37
Jonas Fonsecadf8baa42005-10-03 19:16:30 +020038GIT_COMMITTER_IDENT::
Thomas Ackermann2de9b712013-01-21 20:17:53 +010039 The person who put a piece of code into Git.
Eric W. Biedermanaed022a2005-07-14 18:55:09 -060040
Jonathan Nieder44fcb492009-11-11 18:01:27 -060041GIT_EDITOR::
Thomas Ackermann2de9b712013-01-21 20:17:53 +010042 Text editor for use by Git commands. The value is meant to be
Jonathan Nieder44fcb492009-11-11 18:01:27 -060043 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
Jonathan Nieder4e0ce4d2012-03-31 03:42:34 -050047 `$VISUAL`, then `$EDITOR`, and then the default chosen at compile
48 time, which is usually 'vi'.
Jonathan Nieder5b586192012-03-31 03:44:53 -050049ifdef::git-default-editor[]
50 The build you are using chose '{git-default-editor}' as the default.
51endif::git-default-editor[]
Jonathan Nieder44fcb492009-11-11 18:01:27 -060052
Sean Allred4c3dd932022-12-17 23:09:59 +000053GIT_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
Jonathan Nieder63618242009-10-30 20:41:27 -050061GIT_PAGER::
Thomas Ackermann2de9b712013-01-21 20:17:53 +010062 Text viewer for use by Git commands (e.g., 'less'). The value
Jonathan Nieder63618242009-10-30 20:41:27 -050063 is meant to be interpreted by the shell. The order of preference
64 is the `$GIT_PAGER` environment variable, then `core.pager`
Jonathan Nieder4e0ce4d2012-03-31 03:42:34 -050065 configuration, then `$PAGER`, and then the default chosen at
66 compile time (usually 'less').
Jonathan Nieder5b586192012-03-31 03:44:53 -050067ifdef::git-default-pager[]
68 The build you are using chose '{git-default-pager}' as the default.
69endif::git-default-pager[]
Jonathan Nieder63618242009-10-30 20:41:27 -050070
Thomas Weißschuhe06c9e12021-11-03 21:17:02 +010071GIT_DEFAULT_BRANCH::
72 The name of the first branch created in newly initialized repositories.
73
Junio C Hamano56ae8df2008-05-28 16:55:27 -070074SEE ALSO
Eric W. Biedermanaed022a2005-07-14 18:55:09 -060075--------
Dan McGee5162e692007-12-29 00:20:38 -060076linkgit:git-commit-tree[1]
77linkgit:git-tag[1]
78linkgit:git-config[1]
Eric W. Biedermanaed022a2005-07-14 18:55:09 -060079
Eric W. Biedermanaed022a2005-07-14 18:55:09 -060080GIT
81---
Christian Couder9e1f0a82008-06-06 09:07:32 +020082Part of the linkgit:git[1] suite