配置Powershell 使其支持git_for_windows 并添加到右键菜单

配置Powershell 使其支持git_for_windows 并添加到右键菜单

与hyf一起折腾一晚终于搞定。

1.

更改Powershell配置,使其支持 git.  工具为 Posh-Git 
参考Pro git (git官网可下载)
=============================================================================
If you’ve installed GitHub for Windows, Posh-Git is included by default, and
all you have to do is add these lines to your profile.ps1 (which is usually located
in C:\Users\<username>\Documents\WindowsPowerShell):
. (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1")

. $env:github_posh_git\profile.example.ps1


==============================================================================
!profile.ps1  在Power shell.exe 所在文件夹 新建该文件
!profile.ps1 无数字证书,需修改策略,运行命令   set-executionpolicy remotesigned    


2.更改注册表
在 文件夹空白处右键打开 git shell
=============================================
Windows Registry Editor Version 5.00


[HKEY_CLASSES_ROOT\directory\Background\shell\git_shell]
@="Git Shell Here"


[HKEY_CLASSES_ROOT\directory\Background\shell\git_shell\command]
@="\"C:\Windows\syswow64\Windowspowershell\v1.0\powershell.exe\""

==============================================







  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值