git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git --help not actually showing the git(1) help page..

From
Philip Oakley <philipoakley@iee.org>
Date
May 14, 2019, 14:05 UTC
Message-ID
<3cd065d1-9db5-f2e6-ddff-aa539746d45e@iee.org>
In-Reply-To
<xmqqwoiu9dpb.fsf@gitster-ct.c.googlers.com>

Hi Junio, On 13/05/2019 23:44, Junio C Hamano wrote:

Show 7 quoted lines
> Philip Oakley <philipoakley@iee.org> writes:
>
>> On GfW I commonly use the `git <cmd> --help` when things go wrong, so
>> making the response to that give the right advice would be good.
> There are three levels of details ;-) "git --help" is meant as a
> shorter and sweeter version of "git help git" that is more detailed
> than "git -h".

Though that's not what happens at the moment. For the plain `git --help` case it simply defaults to the `-h` case, while for any other `git cmd --help` it does pop up the git-for-windows configured web browser manual page.

> It is conceivable for an enterprising developer to write a set of
> documentation with medium level details and make "git add --help"
> give such a medium level doc, more detailed than "git add -h" but
> more concice than "git help add".

I'd agree that there's a need for some typical usage/teaching level documentation to _complement_ the reference manual nature of the man pages. It's a chicken - egg situation for some users we/they need the bit of education before they can know they need to refer to, and understand, the respective man pages.

> Those who did "git <cmd> --help"
> did not bother doing so.
>

I tend to go with including the complementary usage/teaching aspects in a distinct section of the man pages, though some of this is based on examples from other software, e.g. Matlab for design/systems engineers.

A simplistic patch for just the 'usage' message to follow.
Philip
Previous: Junio C HamanoNext: Philip Oakley
Message 5 of 19 in “git --help not actually showing the git(1) help page..”
  1. Philip OakleyMay 13, 2019
  2. Jeff KingMay 13, 2019
  3. Philip OakleyMay 13, 2019
  4. Junio C HamanoMay 13, 2019
  5. Philip OakleyMay 14, 2019
  6. git.c: show usage for accessing the git(1) help pagePhilip Oakley, May 14, 2019
  7. Emily ShafferMay 15, 2019
  8. Jeff KingMay 15, 2019
  9. Philip OakleyMay 15, 2019
  10. git.c: show usage for accessing the git(1) help pagePhilip Oakley, May 15, 2019
  11. Eric SunshineMay 15, 2019
  12. 0/2 accessing the git(1) help pagePhilip Oakley, May 15, 2019
  13. 1/2 git.c: show usage for accessing the git(1) help pagePhilip Oakley, May 15, 2019
  14. 2/2 Doc: git.txt: remove backticks from link and add git-scm.com/docsPhilip Oakley, May 15, 2019
  15. Junio C HamanoMay 16, 2019
  16. Philip OakleyMay 16, 2019
  17. Jeff KingMay 16, 2019
  18. Philip OakleyMay 16, 2019
  19. Philip OakleyMay 15, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.