Merge branch 'dm/cherry-pick-s'
[git/git.git] / Documentation / git-help.txt
1 git-help(1)
2 ===========
3
4 NAME
5 ----
6 git-help - display help information about git
7
8 SYNOPSIS
9 --------
10 'git help' [-a|--all|-i|--info|-m|--man|-w|--web] [COMMAND]
11
12 DESCRIPTION
13 -----------
14
15 With no options and no COMMAND given, the synopsis of the 'git'
16 command and a list of the most commonly used git commands are printed
17 on the standard output.
18
19 If the option '--all' or '-a' is given, then all available commands are
20 printed on the standard output.
21
22 If a git command is named, a manual page for that command is brought
23 up. The 'man' program is used by default for this purpose, but this
24 can be overridden by other options or configuration variables.
25
26 Note that 'git --help ...' is identical as 'git help ...' because the
27 former is internally converted into the latter.
28
29 OPTIONS
30 -------
31 -a|--all::
32 Prints all the available commands on the standard output. This
33 option supersedes any other option.
34
35 -i|--info::
36 Display manual page for the command in the 'info' format. The
37 'info' program will be used for that purpose.
38
39 -m|--man::
40 Display manual page for the command in the 'man' format. This
41 option may be used to override a value set in the
42 'help.format' configuration variable.
43 +
44 By default the 'man' program will be used to display the manual page,
45 but the 'man.viewer' configuration variable may be used to choose
46 other display programs (see below).
47
48 -w|--web::
49 Display manual page for the command in the 'web' (HTML)
50 format. A web browser will be used for that purpose.
51 +
52 The web browser can be specified using the configuration variable
53 'help.browser', or 'web.browser' if the former is not set. If none of
54 these config variables is set, the 'git-web--browse' helper script
55 (called by 'git-help') will pick a suitable default. See
56 linkgit:git-web--browse[1] for more information about this.
57
58 CONFIGURATION VARIABLES
59 -----------------------
60
61 help.format
62 ~~~~~~~~~~~
63
64 If no command line option is passed, the 'help.format' configuration
65 variable will be checked. The following values are supported for this
66 variable; they make 'git-help' behave as their corresponding command
67 line option:
68
69 * "man" corresponds to '-m|--man',
70 * "info" corresponds to '-i|--info',
71 * "web" or "html" correspond to '-w|--web'.
72
73 help.browser, web.browser and browser.<tool>.path
74 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
75
76 The 'help.browser', 'web.browser' and 'browser.<tool>.path' will also
77 be checked if the 'web' format is chosen (either by command line
78 option or configuration variable). See '-w|--web' in the OPTIONS
79 section above and linkgit:git-web--browse[1].
80
81 man.viewer
82 ~~~~~~~~~~
83
84 The 'man.viewer' config variable will be checked if the 'man' format
85 is chosen. Only the following values are currently supported:
86
87 * "man": use the 'man' program as usual,
88 * "woman": use 'emacsclient' to launch the "woman" mode in emacs
89 (this only works starting with emacsclient versions 22),
90 * "konqueror": use a man KIO slave in konqueror.
91
92 Multiple values may be given to this configuration variable. Their
93 corresponding programs will be tried in the order listed in the
94 configuration file.
95
96 For example, this configuration:
97
98 [man]
99 viewer = konqueror
100 viewer = woman
101
102 will try to use konqueror first. But this may fail (for example if
103 DISPLAY is not set) and in that case emacs' woman mode will be tried.
104
105 If everything fails the 'man' program will be tried anyway.
106
107 Note about git config --global
108 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
109
110 Note that all these configuration variables should probably be set
111 using the '--global' flag, for example like this:
112
113 ------------------------------------------------
114 $ git config --global help.format web
115 $ git config --global web.browser firefox
116 ------------------------------------------------
117
118 as they are probably more user specific than repository specific.
119 See linkgit:git-config[1] for more information about this.
120
121 Author
122 ------
123 Written by Junio C Hamano <gitster@pobox.com> and the git-list
124 <git@vger.kernel.org>.
125
126 Documentation
127 -------------
128 Initial documentation was part of the linkgit:git[7] man page.
129 Christian Couder <chriscool@tuxfamily.org> extracted and rewrote it a
130 little. Maintenance is done by the git-list <git@vger.kernel.org>.
131
132 GIT
133 ---
134 Part of the linkgit:git[7] suite