- Developers who already know basic commit and branch actions
- Readers who want to understand command boundaries and risk
Command Reference
git-help Tutorial
Explains how to use git-help to open command help and man pages.
- A basic mental model of worktree, index, and commits
- Comfort reading `git status` and a small commit graph
- 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 rebaseto open the full manual page for rebase, viewing all available options and examples. - For a quick terminal reference, use
git rebase --helpto 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
Special cases and boundaries
git help <command>andgit <command> --helpserve the same purpose; the former calls the man page, the latter displays help text in the terminal (exact behavior depends on configuration).git helprelies on the system's man page system — some minimal installations may lack the Git documentation package and require separate installation.- Use
git help --guidesto view Git concept guides (such as gitworkflows, gitrevisions, etc.), not just help for specific commands. git helpaccesses 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.