Skip to content

git help: group common commands by theme

Sébastien Guimmara git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 34 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3command-list.txt: group common commands by themecommand-list.txt+37 -279 replies
2/3generate-cmdlist.sh: parse common group commandsgenerate-cmdlist.sh+31 -123 replies
3/3git help: group common commands by themehelp.c+27 -16 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchJunio C HamanoEric Sunshine
1/3
2/3Helped-by Helped-by
3/3Helped-by Helped-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] git help: group common commands by theme

This v4 includes the following suggestions:

In command-list.txt:
- Add a [groups] block containing names and description for groups:

[groups]

   init                   starting a working area
   worktree               working on the current change
   remote                 working with others
   info                   examining the history and state
   history                growing, marking and tweaking your history

- Add a [commands] header on top of the known command list, and group names as a third column.

[commands]

   git-add            mainporcelain                common-worktree
   git-am             mainporcelain
   git-annotate       ancillaryinterrogators
   git-apply          plumbingmanipulators
   git-archimport     foreignscminterface
   git-archive        mainporcelain
   git-bisect         mainporcelain
   git-blame          ancillaryinterrogators
   git-branch         mainporcelain                common-history

This produces the following output of $ git help:

[...]
The most commonly used git commands are:

* starting a working area:
clone Clone a repository into a new directory
init Create an empty Git repository or reinitialize [...]

* working on the current change:
add Add file contents to the index
reset Reset current HEAD to the specified state

* working with others:

      fetch      Download objects and refs from another repository
      pull       Fetch from and integrate with another repository [...]
      push       Update remote refs along with associated objects

* examining the history and state:
log Show commit logs
status Show the working tree status

* growing, marking and tweaking your history:

      branch     List, create, or delete branches
      checkout   Checkout a branch or paths to the working tree
      commit     Record changes to the repository
      diff       Show changes between commits, commit and working [...]
      merge      Join two or more development histories together

[...]

I removed from the list of common commands: rebase, rm, mv, bisect because [1] they are not really common to an unfamiliar user, [2] to save vertical space occupied by group headers.

Thanks to Junio and Eric for their suggestions.

Sébastien Guimmara (3):
command-list.txt: group common commands by theme generate-cmdlist.sh: parse common group commands git help: group common commands by theme

 command-list.txt    | 64 +++++++++++++++++++++++++++++++----------------------
 generate-cmdlist.sh | 43 +++++++++++++++++++++++++----------
 help.c              | 28 ++++++++++++++++++++++-
 3 files changed, 95 insertions(+), 40 deletions(-)
Signature · 1 line
2.4.0