Command Reference

git-help Tutorial

Explains how to use git-help to open command help and man pages.

Who This Is For
  • Developers who already know basic commit and branch actions
  • Readers who want to understand command boundaries and risk
Prerequisites
  • A basic mental model of worktree, index, and commits
  • Comfort reading `git status` and a small commit graph
Common Risks
  • Using local cleanup commands on already shared history
  • Continuing to rewrite before confirming a recovery path

The short version

git-help is used to open command help and man pages.

When it is a good fit

  • when you need to open command help and man pages
  • when you want this step to be repeatable instead of ad hoc
  • when you need a clearer mental model of what Git is recording or updating

Basic example

git help rebase

What to watch most closely

Learn the default behavior first. Many surprises come from adding flags before the base behavior is clear.

A safer working habit

Pair it with status, log, or diff so you can confirm what actually changed.

Useful angles for understanding it

  • Understand the default behavior clearly
  • Use it in day-to-day Git routines
  • Reuse it safely in scripts or team habits

Related reading

Read it alongside git status, git log, and git show so it is easier to see how the command changes history, refs, the index, or the working tree.

What problem this command solves in a workflow

git help solves the problem of "I need to understand how a specific Git command works, including its parameters and options." It opens the manual page (man page) for a given command or displays help text in the terminal, serving as the primary entry point for learning and troubleshooting Git command usage.

Typical use cases

  • When you forget a command's parameters, use git help rebase to open the full manual page for rebase, viewing all available options and examples.
  • For a quick terminal reference, use git rebase --help to display help text in the terminal without opening a man page.
  • Use git help --web <command> to open HTML-formatted documentation in a browser, suitable for users who are not comfortable with man pages.

Diagram view

Command help documentation accessgit help is Git's built-in documentation entry point, directly accessing local command man pages — no network connection required.
Query target
Command nameHelp systemDocument format choice
Output
Man page contentParameter descriptionsUsage examples
git help accesses locally installed man pages — if the documentation package is not installed, it may need to be obtained separately.

Special cases and boundaries

  • git help <command> and git <command> --help serve the same purpose; the former calls the man page, the latter displays help text in the terminal (exact behavior depends on configuration).
  • git help relies on the system's man page system — some minimal installations may lack the Git documentation package and require separate installation.
  • Use git help --guides to view Git concept guides (such as gitworkflows, gitrevisions, etc.), not just help for specific commands.
  • git help accesses local documentation and does not require a network connection, but the documentation version matches the installed Git version and may not be the latest.
  • For custom aliases, git help <alias> displays the help for the expanded command, not documentation about the alias itself.