git-compat-util: move strbuf.c funcs to its header
[git/gitster.git] / Documentation / git-var.txt
blobf40202b8e3ab521ea22c78986d3bf5bb44a67f09
1 git-var(1)
2 ==========
4 NAME
5 ----
6 git-var - Show a Git logical variable
9 SYNOPSIS
10 --------
11 [verse]
12 'git var' (-l | <variable>)
14 DESCRIPTION
15 -----------
16 Prints a Git logical variable. Exits with code 1 if the variable has
17 no value.
19 OPTIONS
20 -------
21 -l::
22         Cause the logical variables to be listed. In addition, all the
23         variables of the Git configuration file .git/config are listed
24         as well. (However, the configuration variables listing functionality
25         is deprecated in favor of `git config -l`.)
27 EXAMPLES
28 --------
29         $ git var GIT_AUTHOR_IDENT
30         Eric W. Biederman <ebiederm@lnxi.com> 1121223278 -0600
33 VARIABLES
34 ---------
35 GIT_AUTHOR_IDENT::
36     The author of a piece of code.
38 GIT_COMMITTER_IDENT::
39     The person who put a piece of code into Git.
41 GIT_EDITOR::
42     Text editor for use by Git commands.  The value is meant to be
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
47     `$VISUAL`, then `$EDITOR`, and then the default chosen at compile
48     time, which is usually 'vi'.
49 ifdef::git-default-editor[]
50     The build you are using chose '{git-default-editor}' as the default.
51 endif::git-default-editor[]
53 GIT_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`.
61 GIT_PAGER::
62     Text viewer for use by Git commands (e.g., 'less').  The value
63     is meant to be interpreted by the shell.  The order of preference
64     is the `$GIT_PAGER` environment variable, then `core.pager`
65     configuration, then `$PAGER`, and then the default chosen at
66     compile time (usually 'less').
67 ifdef::git-default-pager[]
68     The build you are using chose '{git-default-pager}' as the default.
69 endif::git-default-pager[]
71 GIT_DEFAULT_BRANCH::
72     The name of the first branch created in newly initialized repositories.
74 SEE ALSO
75 --------
76 linkgit:git-commit-tree[1]
77 linkgit:git-tag[1]
78 linkgit:git-config[1]
80 GIT
81 ---
82 Part of the linkgit:git[1] suite