Junio C Hamano | 5825687 | 2007-12-04 08:31:13 | [diff] [blame] | 1 | git-help(1) |
| 2 | =========== |
| 3 | |
| 4 | NAME |
| 5 | ---- |
| 6 | git-help - display help information about git |
| 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
Junio C Hamano | 3dac504 | 2007-12-15 08:40:54 | [diff] [blame] | 10 | 'git help' [-a|--all|-i|--info|-m|--man|-w|--web] [COMMAND] |
Junio C Hamano | 5825687 | 2007-12-04 08:31:13 | [diff] [blame] | 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 |
Junio C Hamano | 0c0da5f | 2007-12-13 02:45:30 | [diff] [blame] | 23 | up. The 'man' program is used by default for this purpose, but this |
Junio C Hamano | fe98605 | 2007-12-19 07:33:38 | [diff] [blame^] | 24 | can be overridden by other options or configuration variables. |
Junio C Hamano | 5825687 | 2007-12-04 08:31:13 | [diff] [blame] | 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:: |
Junio C Hamano | 5825687 | 2007-12-04 08:31:13 | [diff] [blame] | 32 | Prints all the available commands on the standard output. This |
Junio C Hamano | fe98605 | 2007-12-19 07:33:38 | [diff] [blame^] | 33 | option supersedes any other option. |
Junio C Hamano | 5825687 | 2007-12-04 08:31:13 | [diff] [blame] | 34 | |
Junio C Hamano | 0c0da5f | 2007-12-13 02:45:30 | [diff] [blame] | 35 | -i|--info:: |
| 36 | Use the 'info' program to display the manual page, instead of |
| 37 | the 'man' program that is used by default. |
| 38 | |
Junio C Hamano | 3dac504 | 2007-12-15 08:40:54 | [diff] [blame] | 39 | -m|--man:: |
| 40 | Use the 'man' program to display the manual page. This may be |
| 41 | used to override a value set in the 'help.format' |
| 42 | configuration variable. |
| 43 | |
Junio C Hamano | 0c0da5f | 2007-12-13 02:45:30 | [diff] [blame] | 44 | -w|--web:: |
| 45 | Use a web browser to display the HTML manual page, instead of |
| 46 | the 'man' program that is used by default. |
| 47 | + |
| 48 | The web browser can be specified using the configuration variable |
| 49 | 'help.browser', or 'web.browser' if the former is not set. If none of |
Junio C Hamano | 42a2e2d | 2007-12-16 22:13:42 | [diff] [blame] | 50 | these config variables is set, the 'git-help--browse' helper script |
Junio C Hamano | 3dac504 | 2007-12-15 08:40:54 | [diff] [blame] | 51 | (called by 'git-help') will pick a suitable default. |
Junio C Hamano | 0c0da5f | 2007-12-13 02:45:30 | [diff] [blame] | 52 | + |
Junio C Hamano | fe98605 | 2007-12-19 07:33:38 | [diff] [blame^] | 53 | You can explicitly provide a full path to your preferred browser by |
Junio C Hamano | 0c0da5f | 2007-12-13 02:45:30 | [diff] [blame] | 54 | setting the configuration variable 'browser.<tool>.path'. For example, |
| 55 | you can configure the absolute path to firefox by setting |
Junio C Hamano | 42a2e2d | 2007-12-16 22:13:42 | [diff] [blame] | 56 | 'browser.firefox.path'. Otherwise, 'git-help--browse' assumes the tool |
Junio C Hamano | 0c0da5f | 2007-12-13 02:45:30 | [diff] [blame] | 57 | is available in PATH. |
| 58 | + |
| 59 | Note that the script tries, as much as possible, to display the HTML |
| 60 | page in a new tab on an already opened browser. |
| 61 | |
Junio C Hamano | 3dac504 | 2007-12-15 08:40:54 | [diff] [blame] | 62 | CONFIGURATION VARIABLES |
| 63 | ----------------------- |
| 64 | |
| 65 | If no command line option is passed, the 'help.format' configuration |
| 66 | variable will be checked. The following values are supported for this |
| 67 | variable; they make 'git-help' behave as their corresponding command |
| 68 | line option: |
| 69 | |
| 70 | * "man" corresponds to '-m|--man', |
| 71 | * "info" corresponds to '-i|--info', |
| 72 | * "web" or "html" correspond to '-w|--web', |
| 73 | |
| 74 | The 'help.browser', 'web.browser' and 'browser.<tool>.path' will also |
Junio C Hamano | fe98605 | 2007-12-19 07:33:38 | [diff] [blame^] | 75 | be checked if the 'web' format is chosen (either by command line |
Junio C Hamano | 3dac504 | 2007-12-15 08:40:54 | [diff] [blame] | 76 | option or configuration variable). See '-w|--web' in the OPTIONS |
| 77 | section above. |
| 78 | |
| 79 | Note that these configuration variables should probably be set using |
| 80 | the '--global' flag, for example like this: |
| 81 | |
| 82 | ------------------------------------------------ |
| 83 | $ git config --global help.format web |
| 84 | $ git config --global web.browser firefox |
| 85 | ------------------------------------------------ |
| 86 | |
| 87 | as they are probably more user specific than repository specific. |
| 88 | See gitlink:git-config[1] for more information about this. |
| 89 | |
Junio C Hamano | 5825687 | 2007-12-04 08:31:13 | [diff] [blame] | 90 | Author |
| 91 | ------ |
| 92 | Written by Junio C Hamano <gitster@pobox.com> and the git-list |
| 93 | <git@vger.kernel.org>. |
| 94 | |
| 95 | Documentation |
| 96 | ------------- |
| 97 | Initial documentation was part of the gitlink:git[7] man page. |
| 98 | Christian Couder <chriscool@tuxfamily.org> extracted and rewrote it a |
| 99 | little. Maintenance is done by the git-list <git@vger.kernel.org>. |
| 100 | |
| 101 | GIT |
| 102 | --- |
| 103 | Part of the gitlink:git[7] suite |