寫於2018-09-03(基於win10)
開啟
- win + s
- 輸入 ise
操作
主要使用新建的power shell選項卡
將git集成到power shell中
安裝准備
-
確定你的power shell版本是5.X或者power Shell Core 6.0(使用$PSVersionTable.PSVersion查看版本)
-
檢查腳本執行規則是否設置為RemoteSigned或Unrestricted(使用Get-ExecutionPolicy查看,使用Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm)
-
git 命令要添加到環境變量中
開始安裝
-
打開powershell ise
-
執行命令 PowerShellGet\Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force 或是 PowerShellGet\Update-Module posh-git(更新)
-
引入並且支持所有用戶所有主機,在管理員權限下打開powershell,執行命令 Add-PoshGitToProfile -AllUsers -AllHosts
-
完畢,重啟powershell即可
補充
- 在powershell ise中,直接ctrl + c可能會在右下角一直提示正在停止,實際並未停止,所以這里采用殺死進程的方式將其關閉
- 方式一: stop-process -Name 'node' (將所有node進程全部關閉)
- 方式二: get-process node 查看與node相關的所有進程(主要看id),再執行stop-process -id id號 關閉對應的node進程