threads / discuss / 57787

--help for git commands

Subject: --help for git commands

## tl;dr

3 messages between Apr 24, 2022 and Apr 25, 2022.

replies: 2people: 3as markdown or json

Dorian Marié· Apr 24, 2022, 06:18 UTC · lore
Hi,

I think it would be nice to have a simple help like other programs do when doing `git [subcommand] --help` or `git [subcommand] -h`.

It would be a short version of the manual.
What do you think?

Thanks, Dorian

Shaoxuan Yuan· Apr 25, 2022, 06:22 UTC · re: Dorian Marié · lore

Re: --help for git commands

On Sun, Apr 24, 2022 at 2:26 PM Dorian Marié <dorian@dorianmarie.fr> wrote:
Show 7 quoted lines
>
> Hi,
>
> I think it would be nice to have a simple help like other programs do
> when doing `git [subcommand] --help` or `git [subcommand] -h`.
>
> It would be a short version of the manual.
I think we do have a "simple help like other programs do".

You will get the git manual page for a command, for example, git-add, with one of the followings:

`git add --help` `git help add` `man git-add`

Or, you can get a "short version of the manual", i.e. usage string, using this:
`git add -h`
-- 
Thanks & Regards,
Shaoxuan
Philip Oakley· Apr 25, 2022, 13:55 UTC · re: Shaoxuan Yuan · lore

Re: --help for git commands

Hi Dorian On 25/04/2022 07:22, Shaoxuan Yuan wrote:

Show 20 quoted lines
> On Sun, Apr 24, 2022 at 2:26 PM Dorian Marié <dorian@dorianmarie.fr> wrote:
>> Hi,
>>
>> I think it would be nice to have a simple help like other programs do
>> when doing `git [subcommand] --help` or `git [subcommand] -h`.
>>
>> It would be a short version of the manual.
> I think we do have a "simple help like other programs do".
>
> You will get the git manual page for a command, for example, git-add,
> with one of the followings:
>
> `git add --help`
> `git help add`
> `man git-add`
>
> Or, you can get a "short version of the manual", i.e. usage string, using this:
>
> `git add -h`
>

The `-h` option is listed in the command line interpreter (cli) guide `git help cli` and the help command is listed via the `git help help`, which also notes the `git help git` method for getting git's own help/man page.

All part of the many 'obvious in retrospect' parts of Git ;-)
Philip

← back to recent threads