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的路徑位置

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM