在Git Bash上使用辅助

时间:2015-08-12 03:09:39

标签: windows git bash git-bash

我使用Windows 7。在help中使用Git Bash的正确方法是什么?

help command

command --help

例如:

我必须使用 CTRL C 来破解以下命令的结果

$ while --help
>

但这有效:

$ help while
while: while COMMANDS; do COMMANDS; done
     Expand and execute COMMANDS as long as the final command in the
    `while' COMMANDS has an exit status of zero.

$ help touch
sh.exe": help: no help topics match `touch'.  Try `help help' or `man -k touch'
or `info touch'.

但是

$ touch --help
Usage: touch [OPTION]... FILE...
  or:  touch [-acm] MMDDhhmm[YY] FILE... (obsolescent)
...

我看了An A-Z Index of the Bash command line for Linux。但是我没有发现使用help命令的任何事情。

1 个答案:

答案 0 :(得分:1)

How to Get Help With a Command from the Linux Terminal中所述,help仅用于构建Bash shell本身的命令的简短列表。 touch不是其中之一。

对于git命令,您可以调用git help <command>(如git help checkout)。

请务必使用与latest release from git-for-windows打包在一起的git-bash.exe:其bash明显比the old msysgit one更新。
请参阅&#34; Why is it that if you download Git 2.0 from the net, you always get a 1.9.4 installer package?&#34;。