我想从cmder powershell中使用git。
Cmder打印出以下错误:
缺少git支持,请使用“安装模块posh-git”安装posh-git并重新启动cmder
如果我运行Install-Module posh-git
cmder,则会打印出下一个错误:
- 安装模块<<<< posh-git
- CategoryInfo:ObjectNotFound:(安装模块:字符串)[],CommandNotFoundException
- FullyQualifiedErrorId:CommandNotFoundException
cmder/vendor/git-for-windows
“ Git for Windows”中已安装的文件我的git命令正在运行,但是没有显示我正在处理的分支。
那么我该如何解决呢?
您的CommandNotFoundException是因为Install-Module
需要Powershell 3.0或PSGet
要安装。但是,手动安装应该起作用。
验证文件posh-git.psm1
是否位于中$env:PSModulePath
。然后重新启动PowerShell并运行Import-Module posh-git
。这应该迫使它找到模块。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句