[英]git help in Windows command prompt
Windows上的git help
命令( msysgit
发行版)每次运行时都会生成Web浏览器。 我试过git help -m
报告"No manual entry for ..."
和git help -i
,其中说"info: Terminal type 'msys' is not smart enough to run Info."
在Cygwin
下的bash
。
在cmd
终端有没有明智的方法来获得轻量级的帮助?
它适用于特定命令: git <command> -h
编辑 ,感谢@ the-happy-hippo
但它只显示了一个简短的描述,而不是完整的描述,因为git help <command>
或git <command> --help
在Windows上提供。
Git 2.x的更新(2017年6月,Git 2.13.1)
你还没有男人:
> git -c help.format=man help add
warning: failed to exec 'man': No such file or directory
fatal: no man viewer handled the request
对于git <verb> --help
。
git <verb> -h
不打印手册页,只有短用法部分(与人无关)
不,即使基于htlp txt文件的'cat'的替代方案,也建议在“ 如何让git在Windows中显示命令行帮助? ”。
有人man.<tool>.cmd
在2008年推出的man.<tool>.cmd
config ,允许设置自定义命令,但msys shell不随man.exe
一起提供。
解决此问题的世界上最过分的工作方式:使用WSL
(也就是说,除非您已经是WSL用户,在这种情况下,它只是一个普通的解决方法)
bash -c 'git help fetch'
等。 这是最后一个的别名:
[alias]
hep = "!f() { $SYSTEMROOT/System32/bash -c \"git help $1\"; }; f"
(并且你不能覆盖git内置函数,但是你可以创建一个shell命令来拦截和重新路由help
。)
git <verb> -h
显示同一终端窗口中的命令用法。
另一方面, git <verb> --help
和git help <verb>
打开一个浏览器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.