powershell使用git

前提:已经安装了git
前言:由于安装了git后,默认的git只能在它所在目录下使用git,非常不方便,所以我们使用以下软件包,达到可以在任何目录下使用Git
软件下载:https://github.com/1stPeak/posh-git-master

Win+x -> 运行Powershell(管理员)。Powershell默认不支持运行脚本,需要首先执行指令
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm
弹出提示框,输入“Y”确认

cd切换目录为posh-git-master解压目录,执行安装脚本
.\install.ps1
之后即可在任一目录下使用git
发布了135 篇原创文章 · 获赞 51 · 访问量 5万+

猜你喜欢

转载自blog.csdn.net/qq_41617034/article/details/104336586