配置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\""
==============================================