← Back to Git Course | Chapter 2: Basic Commands | Lesson 6 of 18

Git help Command

What is git help?

git help is Git's built-in manual system -- it opens detailed documentation for any command, including every available flag and usage example, without you ever needing to leave the terminal or search online.

Example: What is git help?

bash
git help

Accessing Command Manuals

Running git help <command> (for example git help init) opens that command's full manual page, the same detailed reference you'd find in Git's official documentation, formatted for reading directly in your terminal.

Example: Accessing Command Manuals

bash
git help init

Compact Shorthand Help (-h)

When you just need a quick reminder of a command's flags rather than the full manual, appending -h (like git init -h) prints a short, scannable summary instead of opening the entire man page.

Example: Compact Shorthand Help (-h)

bash
git init -h

Listing All Available Commands

git help --all lists every single Git command installed on your system, including many obscure ones you'll rarely touch -- a useful way to discover the actual size of Git's toolkit beyond the dozen commands most people use daily.

Example: Listing All Available Commands

bash
git help --all

Online Git Help Guides

Beyond the built-in docs, community guides and troubleshooting walkthroughs (including ones at cookiescursor.com/git-help) are often faster for solving a specific real-world problem than the formal manual pages, which focus on syntax rather than workflow.

Example: Online Git Help Guides

bash
# See cookiescursor.com/git-help for community guides and walkthroughs

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.