LinuxCommandLibrary

git-help

Display Git command documentation

TLDR

Display help about a specific Git subcommand

$ git help [subcommand]
copy

Display help about a specific Git subcommand in a web browser
$ git help --web [subcommand]
copy

Display a list of all available Git subcommands
$ git help --all
copy

List the available guides
$ git help --guide
copy

List all possible configuration variables
$ git help --config
copy

SYNOPSIS

git help [-a | --all] [-g | --guide] [-i | --info | -w | --web] [command | manpage]

PARAMETERS

-a, --all
    Show the complete list of available commands.

-g, --guide
    Show the list of the most commonly used Git commands.

-i, --info
    Read man pages using the info program (if available).

-w, --web
    Display the manual page in a web browser.

command
    The Git command for which help is requested (e.g., `git help commit`).

manpage
    A specific man page to display (e.g., `git help git`).

DESCRIPTION

git-help is Git's built-in help system. It provides access to Git's documentation, tutorials, and man pages. The command is designed to be intuitive and accessible directly from the command line. It allows users to quickly find information about Git commands, concepts, and workflows without leaving their terminal.

git-help can display the documentation for a specific Git command, show a general overview of Git, or list available commands. It relies on installed man pages and the documentation included with Git. A web browser can also be opened to display the relevant documentation.

It is a crucial tool for both beginners and experienced Git users to quickly understand the functionality and usage of various Git commands, which is especially useful for complex operations or when encountering errors. The documentation is an essential resource, and git-help provides a convenient way to access it.

FINDING HELP

When a command or manpage name is provided, git-help searches for the corresponding documentation in the following order: first in the installed documentation directory, then in the man pages, and finally in the web browser (if requested).

WEB BROWSER

When the `--web` option is used, git-help will attempt to open the documentation in a web browser. The browser used is determined by the `GIT_WEB_BROWSER`, `BROWSER`, and `xdg-open` environment variables, and system defaults.

SEE ALSO

git(1), man(1), info(1)

Copied to clipboard