列出管道命令(以及其他命令,在它们自己的部分)的实际命令是:
git help -av
来自git/git/command-list.txt。
这在 Git 2.20(2018 年第四季度)发生了变化,考虑到“git help -a”和“git help -av”提供不同的信息,通常“详细”版本对新用户更友好。
“git help -a”现在默认使用更详细的输出(使用“--no-verbose”,你可以回到原来的)。
参见Nguyễn Thái Ngọc Duy (pclouds) 的commit 26c7d06(2018 年 9 月 29 日)。
(由 Junio C Hamano -- gitster -- 合并到 commit 54e564e,2018 年 10 月 19 日)
help -a:改进并使--verbose默认
当您输入“git help”(或只是“git”)时,您会看到一个包含常用命令及其简短描述的列表,建议您使用“git help -a”或“git help -g”了解更多详情。
“git help -av”会更友好并与“git help”显示的内容内联,因为它还显示带有描述的命令列表,并且命令被正确分组。
“help -av”并未显示“help -a”显示的所有内容。
为此在“help -av”中添加外部命令部分。在那里,也为别名添加一个部分(直到现在别名没有 UI,只有“git config”)。
现在将返回一个简单的 git help -a(使用 Git 2.20+):
vonc@VONC D:\git\git
> git help -a
Main Porcelain Commands
add Add file contents to the index
am Apply a series of patches from a mailbox
archive Create an archive of files from a named tree
bisect Use binary search to find the commit that introduced a bug
...
使用 Git 2.25(2020 年第一季度),命令列表更加完整。
参见Philippe Blain (phil-blain) 的commit 762d5b4(2019 年 10 月 28 日)。
(由 Junio C Hamano -- gitster -- 合并于 commit ecbddd1,2019 年 12 月 1 日)
help:将gitsubmodules添加到指南列表中
签字人:Philippe Blain
审核人:Jonathan Nieder
指南“gitsubmodules”被添加到d480345(“submodules:大修文档”,2017-06-22,Git v2.14.0-rc0 -- merge列在batch #0),但在commit 1b81d8c(“help:使用command-list.txt作为指南的来源”,2018-05-20,Git v2.18.0-rc1 -- merge)时没有添加到command-list.txt教“git help”从此文件中获取指南列表。
现在添加它,并将gitsubmodules的描述的第一个单词大写,就像1b81d8c中所做的那样(“help:使用command-list.txt作为指南的来源”,2018-05-20, Git v2.18.0-rc1 -- merge) 用于其他指南。