使用windows powershell ISE管理命令視窗,並整合git命令

來源:互聯網
上載者:User

標籤:user   設定   for   res   node   主機   soft   建立   lease   

寫於2018-09-03(基於win10)

開啟
  1. win + s
  2. 輸入 ise
操作

主要使用建立的power shell選項卡

將git整合到power shell中安裝準備
  1. 確定你的power shell版本是5.X或者power Shell Core 6.0(使用$PSVersionTable.PSVersion查看版本)

  2. 檢查指令碼執行規則是否設定為RemoteSigned或Unrestricted(使用Get-ExecutionPolicy查看,使用Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm)

  3. git 命令要添加到環境變數中

開始安裝
  1. 開啟powershell ise

  2. 執行命令 PowerShellGet\Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force 或是 PowerShellGet\Update-Module posh-git(更新)

  3. 引入並且支援所有使用者所有主機,在管理員權限下開啟powershell,執行命令 Add-PoshGitToProfile -AllUsers -AllHosts

  4. 完畢,重啟powershell即可

補充
  1. 在powershell ise中,直接ctrl + c可能會在右下角一直提示正在停止,實際並未停止,所以這裡採用殺死進程的方式將其關閉
    • 方式一: stop-process -Name ‘node‘ (將所有node進程全部關閉)
    • 方式二: get-process node 查看與node相關的所有進程(主要看id),再執行stop-process -id id號 關閉對應的node進程
參考
  • posh-git
  • powershell

使用windows powershell ISE管理命令視窗,並整合git命令

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.