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

Re: [PATCH] Modified the default git help message to be grouped by topic

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 3, 2008, 00:10 UTC
Message-ID
<7vfxl6m84g.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20081202233004.GA22379@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 17 quoted lines
> On Tue, Dec 02, 2008 at 11:55:03PM +0100, Johannes Schindelin wrote:
>
>> If the whole thing gets longer than 24 lines, we have to leave some things 
>> out.  Personally, I consider rm and mv unimportant enough that they could 
>> be shown in an extended list, but be left out of the summary page.
>
> For the record, the current output is 26 lines, plus you probably want
> to account for 1 line of the user's next shell prompt. So we are 3 lines
> over already.
>
> Scott's proposal is about grouping the commands more sensibly. Many of
> the complaints are about the length of the output. Maybe we should scrap
> having a list of commands altogether and just point at section-specific
> documentation, each of which could discuss basic commands related to it.
>
> I think there has been mention of task-oriented documentation pointers
> before, and I think this is a place where we would want it.

It might not be a bad idea to make this "top page help" into an interactive hierarchical help topic browser. You would start a page that might look like this:

    Bootstrapping -- preparing an area to work in
        init, clone
    Basic -- review, undo and record your changes
        diff, status, checkout <path>, add, reset, commit
    History -- inspect what you have now, and what happened before
        log, blame, grep, show
    Branching and Merging -- build and use alternate histories
	branch, checkout -b, merge, rebase
    Working with Others
	remote, fetch, pull, push

with each of the command and the heading being a "link" (use ncurses for that). If you choose the leaf-level command (say, 'diff'), you will get the git-diff(1) manual page. If you pick one of the headings, say, "Basic", you may get a more extended description of commands in the category, that may include other basic commands not in the front page, perhaps, like this:

    (review)
    diff HEAD: view what you did since the last commit
    diff: view what you did since you last added
    diff --cached: view what you already added
    status: list what are added and changes yet to be added
    (undo)
    checkout path...: checkout a copy from the staging area
    checkout HEAD path...: checkout a copy from the last commit
    reset: undo earlier "git add" to the staging area
    reset path...: do so only for the named paths
    (record)
    mv path1 path2: move the state of path1 to path2
    rm path2: remove path2
    rm --cached path2: do so without losing the copy in the working tree
    add: add the contents to the staging area
    add -p: do so interactively, hunk by hunk
    commit: record the changes you added to the staging area
    commit path...: record all the changes to the paths, ignoring
    	changes you added to the staging area for other paths.
and again each element can be a "link".
Previous: Scott ChaconNext: Jeff King
Message 10 of 12 in “Modified the default git help message to be grouped by topic”
  1. Modified the default git help message to be grouped by topicScott Chacon, Dec 1, 2008
  2. Jeff KingDec 1, 2008
  3. Junio C HamanoDec 2, 2008
  4. Scott ChaconDec 2, 2008
  5. James PickensDec 2, 2008
  6. Boyd Stephen Smith Jr.Dec 2, 2008
  7. Johannes SchindelinDec 2, 2008
  8. Jeff KingDec 2, 2008
  9. Scott ChaconDec 2, 2008
  10. Junio C HamanoDec 3, 2008
  11. Jeff KingDec 3, 2008
  12. Jakub NarebskiDec 3, 2008

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.