2016 - 2024

感恩一路有你

cmd中ping命令无效 怎样在cmd和powershell中使用git命令?

浏览量:2637 时间:2021-03-15 16:04:31 作者:admin

怎样在cmd和powershell中使用git命令?

参考页:http://thepracticalsysadmin.com/setting-up-git-in-windows/

https://github.com/dahlbyk/posh-git

如果您已经安装了psget,请运行以下命令:

install module posh git

您也可以手动安装它:

确认您的PowerShell高于2.0、3.0或更高版本,您可以使用以下命令进行检查:

$PSVersionTable.PSVersion版本

确认脚本的执行策略是允许的(remotesignated或unrestricted)。查看当前策略和设置策略的命令如下:

get executionpolicy

set executionpolicy remotesignated-scope currentuser-Confirm

确保git可以在shell中运行。如果提示“找不到命令”,则需要将%programfiles(x86)%gitCMD(如果仍使用32位操作系统,则路径为%programfiles%gitCMD)添加到环境变量的路径中。

将post git复制到您的计算机,然后在post git文件夹安装.ps1就这样。

cmd中ping命令无效 cmd中输入命令无效 怎么退出cmd中的输入命令

版权声明:本文内容由互联网用户自发贡献,本站不承担相关法律责任.如有侵权/违法内容,本站将立刻删除。