powershell里添加对git的支持

在powershell命令行里依次运行

1. 

 (new-object Net.WebClient).DownloadString("http://psget.net/GetPsGet.ps1") | iex

 

2.  

install-module posh-git

 

 

如果你的系统是64位的,可能会报错

"D:\我的资料库\Documents\WindowsPowerShell\Modules" is added to the PSModulePath environment variable
Creating PowerShell profile...
D:\我的资料库\Documents\WindowsPowerShell\NuGet_profile.ps1
Could not find git command. Please create a git alias or add %ProgramFiles%\Git\cmd to PATH.
Module posh-git was successfully installed.
git command could not be found. Please create an alias or add it to your PATH.

这时只要在系统环境变量里加入如下命令即可

 

变量名:GIT_DIR

变量值:C:\Program Files (x86)\Git\cmd

注意变量值为你系统安装git的路径位置

 

转载于:https://www.cnblogs.com/Jeffiy/p/4006901.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值