Skip to content

help Git Command Guide

The git help command displays help information about Git commands, concepts, and configuration. It provides access to manual pages, command lists, guides, and configuration documentation through various display formats.

Terminal window
git help [-a|--all] [--[no-]verbose] [--[no-]external-commands] [--[no-]aliases]
git help [[-i|--info] [-m|--man] [-w|--web]] [<command>|<doc>]
git help [-g|--guides]
git help [-c|--config]
git help [--user-interfaces]
git help [--developer-interfaces]
ModeDescription
General helpNo args: shows synopsis and common commands
All commands-a/--all: list all available commands
Specific commandgit help <command>: help for specific command
Guides-g/--guides: show Git concept guides
Config docs-c/--config: configuration documentation
Interfaces--user-interfaces or --developer-interfaces: interface documentation
OptionDescription
-m, --manDisplay help in man page format (default in terminals)
-w, --webDisplay help in web browser
-i, --infoDisplay help using info browser
--verboseInclude verbose command descriptions
--no-external-commandsExclude external commands from lists
--no-aliasesExclude alias commands from lists
ParameterDescription
<command>Name of Git command to show help for
<doc>Name of Git documentation/doc to display

Get basic Git overview and common commands

Section titled “Get basic Git overview and common commands”
Terminal window
git help

Shows Git synopsis and most commonly used commands.

Terminal window
git help --all

Displays complete list of all available Git commands, including plumbing commands.

Show help for specific command in terminal

Section titled “Show help for specific command in terminal”
Terminal window
git help add

Displays manual page for git-add command in terminal pager.

Terminal window
git help --web log

Opens git-log manual page in default web browser.

Terminal window
git help --config

Shows configuration variable documentation.

Terminal window
git help --guides

Lists available Git concept guides like tutorials and workflows.

Terminal window
git help --user-interfaces

Displays documentation about user interface components.

Terminal window
git help --developer-interfaces

Shows documentation for developer-facing interfaces and APIs.

Terminal window
git help --all --no-external-commands

Lists only built-in Git commands, excluding external tools.

Terminal window
git help --all --verbose

Shows commands with expanded descriptions in listing.

Terminal window
git help workflow

Shows Git workflow documentation if available.

Terminal window
git help tutorial

Access Git tutorial documentation.

Terminal window
git help config-advice

Shows configuration best practices and examples.

Terminal window
git help index

Access Git documentation index if available.

Terminal window
git help workflows

Shows available Git workflow guides.

Terminal window
git help everyday

Lists everyday Git commands grouped by usage category.

What’s the difference between git help and man git command?

Section titled “What’s the difference between git help and man git command?”

git help automatically finds and displays the correct man page with Git’s configured pager, while ‘man’ requires manual man page location.

Use ‘git help —all’ then pipe through grep: ‘git help —all | grep -i “merge”’ to find merge-related commands.

Can git help show commands in different languages?

Section titled “Can git help show commands in different languages?”

Git help respects LC_ALL, LANG, and other locale environment variables for displaying help in different languages when translations are available.

What’s the fastest way to check if a Git command exists?

Section titled “What’s the fastest way to check if a Git command exists?”

Use ‘git help ’ - if command doesn’t exist, you’ll get an error message; if it exists, you’ll see its documentation.

Git help opens ‘https://git-scm.com/docs/git-’ in browser, providing web versions of man pages with better formatting.

Can I customize which pager git help uses?

Section titled “Can I customize which pager git help uses?”

Set PAGER or GIT_PAGER environment variables, or configure core.pager in git config to use preferred pager application.

What’s the difference between —user-interfaces and —developer-interfaces?

Section titled “What’s the difference between —user-interfaces and —developer-interfaces?”

—user-interfaces shows user-facing Git documentation; —developer-interfaces shows API and internal interface documentation.

Use full command name: ‘git help config’ or ‘git help remote’ - help system understands Git’s subcommand structure.

Can git help integrate with IDE documentation?

Section titled “Can git help integrate with IDE documentation?”

Yes, many IDEs and editors use ‘git help —man’ to display formatted documentation within their interface instead of external pager.

How do I access offline help without internet?

Section titled “How do I access offline help without internet?”

Git help works completely offline, using locally installed man pages. No internet connection required for any help command.

What’s the performance impact of git help —all?

Section titled “What’s the performance impact of git help —all?”

—all loads all available commands into memory; for performance on large Git installs, pipe through head or less: ‘git help —all | less’.

Git looks in GIT_DIR/doc directory for custom documentation; you can add your own man pages or HTML files for team-specific extensions.

How does help determine available commands?

Section titled “How does help determine available commands?”

git help scans $PATH for executables starting with ‘git-’, plus aliases and built-ins. Excludes dotfile executables by default.

What’s the relationship between git help and git —help?

Section titled “What’s the relationship between git help and git —help?”

git —help and git help are identical - both invoke Git’s integrated help system.

Can I see help for built-in Git commands vs external tools?

Section titled “Can I see help for built-in Git commands vs external tools?”

—external-commands option distinguishes between Git’s built-in commands and external tools that happen to start with ‘git-’.

How do I troubleshoot missing help documentation?

Section titled “How do I troubleshoot missing help documentation?”

Check MANPATH environment variable, ensure git-man package installed, or use —web option which opens documentation at git-scm.com.

Web-based help (—web) may show syntax highlighting; terminal help depends on pager configuration and terminal capabilities.

  1. Command Discovery: Explore available Git functionality through categorized command lists
  2. Learning Tool: Access tutorials and guides for mastering Git workflows and concepts
  3. Reference System: Quick access to detailed command syntax and options
  4. Configuration Guide: Understand Git configuration options and settings
  5. Troubleshooting Aid: Find solutions through documentation and examples
  6. API Exploration: Discover Git’s user and developer interface capabilities for tool integration