[英]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.