Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/Documentation/git-help.adoc # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / Documentation / git-help.adoc` 231 lines ยท 7527 bytes Raw Blame History 1 git-help(1) 2 =========== 3 4 NAME 5 ---- 6 git-help - Display help information about Git 7 8 SYNOPSIS 9 -------- 10 [verse] 11 'git help' [-a|--all] [--[no-]verbose] [--[no-]external-commands] [--[no-]aliases] 12 'git help' [[-i|--info] [-m|--man] [-w|--web]] [|] 13 'git help' [-g|--guides] 14 'git help' [-c|--config] 15 'git help' [--user-interfaces] 16 'git help' [--developer-interfaces] 17 18 DESCRIPTION 19 ----------- 20 21 With no options and no '' or '' given, the synopsis of the 'git' 22 command and a list of the most commonly used Git commands are printed 23 on the standard output. 24 25 If the option `--all` or `-a` is given, all available commands are 26 printed on the standard output. 27 28 If the option `--guides` or `-g` is given, a list of the 29 Git concept guides is also printed on the standard output. 30 31 If a command or other documentation is given, the relevant manual page 32 will be brought up. The 'man' program is used by default for this 33 purpose, but this can be overridden by other options or configuration 34 variables. 35 36 If an alias is given, git shows the definition of the alias on 37 standard output. To get the manual page for the aliased command, use 38 `git --help`. 39 40 Note that `git --help ...` is identical to `git help ...` because the 41 former is internally converted into the latter. 42 43 To display the linkgit:git[1] man page, use `git help git`. 44 45 This page can be displayed with 'git help help' or `git help --help`. 46 47 OPTIONS 48 ------- 49 -a:: 50 --all:: 51 Print all the available commands on the standard output. 52 53 --no-external-commands:: 54 When used with `--all`, exclude the listing of external "git-*" 55 commands found in the `$PATH`. 56 57 --no-aliases:: 58 When used with `--all`, exclude the listing of configured 59 aliases. 60 61 --verbose:: 62 When used with `--all`, print description for all recognized 63 commands. This is the default. 64 65 -c:: 66 --config:: 67 List all available configuration variables. This is a short 68 summary of the list in linkgit:git-config[1]. 69 70 -g:: 71 --guides:: 72 Print a list of the Git concept guides on the standard output. 73 74 --user-interfaces:: 75 Print a list of the repository, command and file interfaces 76 documentation on the standard output. 77 + 78 In-repository file interfaces such as `.git/info/exclude` are 79 documented here (see linkgit:gitrepository-layout[5]), as well as 80 in-tree configuration such as `.mailmap` (see linkgit:gitmailmap[5]). 81 + 82 This section of the documentation also covers general or widespread 83 user-interface conventions (e.g. linkgit:gitcli[7]), and 84 pseudo-configuration such as the file-based `.git/hooks/*` interface 85 described in linkgit:githooks[5]. 86 87 --developer-interfaces:: 88 Print a list of file formats, protocols and other developer 89 interfaces documentation on the standard output. 90 91 -i:: 92 --info:: 93 Display manual page for the command in the 'info' format. The 94 'info' program will be used for that purpose. 95 96 -m:: 97 --man:: 98 Display manual page for the command in the 'man' format. This 99 option may be used to override a value set in the 100 `help.format` configuration variable. 101 + 102 By default the 'man' program will be used to display the manual page, 103 but the `man.viewer` configuration variable may be used to choose 104 other display programs (see below). 105 106 -w:: 107 --web:: 108 Display manual page for the command in the 'web' (HTML) 109 format. A web browser will be used for that purpose. 110 + 111 The web browser can be specified using the configuration variable 112 `help.browser`, or `web.browser` if the former is not set. If neither of 113 these config variables is set, the 'git web{litdd}browse' helper script 114 (called by 'git help') will pick a suitable default. See 115 linkgit:git-web{litdd}browse[1] for more information about this. 116 117 CONFIGURATION VARIABLES 118 ----------------------- 119 120 help.format 121 ~~~~~~~~~~~ 122 123 If no command-line option is passed, the `help.format` configuration 124 variable will be checked. The following values are supported for this 125 variable; they make 'git help' behave as their corresponding command- 126 line option: 127 128 * "man" corresponds to '-m|--man', 129 * "info" corresponds to '-i|--info', 130 * "web" or "html" correspond to '-w|--web'. 131 132 help.browser, web.browser, and browser..path 133 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 134 135 The `help.browser`, `web.browser` and `browser..path` will also 136 be checked if the 'web' format is chosen (either by command-line 137 option or configuration variable). See '-w|--web' in the OPTIONS 138 section above and linkgit:git-web{litdd}browse[1]. 139 140 man.viewer 141 ~~~~~~~~~~ 142 143 The `man.viewer` configuration variable will be checked if the 'man' 144 format is chosen. The following values are currently supported: 145 146 * "man": use the 'man' program as usual, 147 * "woman": use 'emacsclient' to launch the "woman" mode in emacs 148 (this only works starting with emacsclient versions 22), 149 * "konqueror": use 'kfmclient' to open the man page in a new konqueror 150 tab (see 'Note about konqueror' below). 151 152 Values for other tools can be used if there is a corresponding 153 `man..cmd` configuration entry (see below). 154 155 Multiple values may be given to the `man.viewer` configuration 156 variable. Their corresponding programs will be tried in the order 157 listed in the configuration file. 158 159 For example, this configuration: 160 161 ------------------------------------------------ 162 [man] 163 viewer = konqueror 164 viewer = woman 165 ------------------------------------------------ 166 167 will try to use konqueror first. But this may fail (for example, if 168 DISPLAY is not set) and in that case emacs' woman mode will be tried. 169 170 If everything fails, or if no viewer is configured, the viewer specified 171 in the `GIT_MAN_VIEWER` environment variable will be tried. If that 172 fails too, the 'man' program will be tried anyway. 173 174 man..path 175 ~~~~~~~~~~~~~~~ 176 177 You can explicitly provide a full path to your preferred man viewer by 178 setting the configuration variable `man..path`. For example, you 179 can configure the absolute path to konqueror by setting 180 'man.konqueror.path'. Otherwise, 'git help' assumes the tool is 181 available in PATH. 182 183 man..cmd 184 ~~~~~~~~~~~~~~ 185 186 When the man viewer, specified by the `man.viewer` configuration 187 variables, is not among the supported ones, then the corresponding 188 `man..cmd` configuration variable will be looked up. If this 189 variable exists then the specified tool will be treated as a custom 190 command and a shell eval will be used to run the command with the man 191 page passed as arguments. 192 193 Note about konqueror 194 ~~~~~~~~~~~~~~~~~~~~ 195 196 When 'konqueror' is specified in the `man.viewer` configuration 197 variable, we launch 'kfmclient' to try to open the man page on an 198 already opened konqueror in a new tab if possible. 199 200 For consistency, we also try such a trick if 'man.konqueror.path' is 201 set to something like `A_PATH_TO/konqueror`. That means we will try to 202 launch `A_PATH_TO/kfmclient` instead. 203 204 If you really want to use 'konqueror', then you can use something like 205 the following: 206 207 ------------------------------------------------ 208 [man] 209 viewer = konq 210 211 [man "konq"] 212 cmd = A_PATH_TO/konqueror 213 ------------------------------------------------ 214 215 Note about git config --global 216 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 217 218 Note that all these configuration variables should probably be set 219 using the `--global` flag, for example like this: 220 221 ------------------------------------------------ 222 $ git config --global help.format web 223 $ git config --global web.browser firefox 224 ------------------------------------------------ 225 226 as they are probably more user specific than repository specific. 227 See linkgit:git-config[1] for more information about this. 228 229 GIT 230 --- 231 Part of the linkgit:git[1] suite