Git自动补全以及显示当前分支

修改策略为 RemoteSigned ,按照完成之后如果再把策略模式设置为 Default ,那么Powershell将无法加载该工具,所以得一致保持为 RemoteSigned 模式。

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm
Set-ExecutionPolicy Default -Scope CurrentUser -Confirm

按照方式:

卸载 posh-git

编辑 $PROFILE 文件(code $PROFILE),然后删除相关配置代码。

Import-Module 'C:\Windows\System32\WindowsPowerShell\v1.0\posh-git\src\posh-git.psd1

参考:

步骤

  1. 升级至最新的 PowerShell
  2. 强化 PowerShell
  3. 安装 包管理器
  4. 安装 Node.js 版本管理器