cmd中ping命令無效 怎樣在cmd和powershell中使用git命令?
怎樣在cmd和powershell中使用git命令?參考頁:http://thepracticalsysadmin.com/setting-up-git-in-windows/ https://git
怎樣在cmd和powershell中使用git命令?
參考頁:http://thepracticalsysadmin.com/setting-up-git-in-windows/
https://github.com/dahlbyk/posh-git
如果您已經(jīng)安裝了psget,請運(yùn)行以下命令:
install module posh git
您也可以手動安裝它:
確認(rèn)您的PowerShell高于2.0、3.0或更高版本,您可以使用以下命令進(jìn)行檢查:
$PSVersionTable.PSVersion版本
確認(rèn)腳本的執(zhí)行策略是允許的(remotesignated或unrestricted)。查看當(dāng)前策略和設(shè)置策略的命令如下:
get executionpolicy
set executionpolicy remotesignated-scope currentuser-Confirm
確保git可以在shell中運(yùn)行。如果提示“找不到命令”,則需要將%programfiles(x86)%gitCMD(如果仍使用32位操作系統(tǒng),則路徑為%programfiles%gitCMD)添加到環(huán)境變量的路徑中。
將post git復(fù)制到您的計算機(jī),然后在post git文件夾安裝.ps1就這樣。