配置Powershell 使其支持git_for_windows 并添加到右键菜单
2015-05-17 23:10
411 查看
配置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\""
==============================================
与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\""
==============================================
相关文章推荐
- 添加/删除 windows下Git右键菜单
- 添加/删除 windows下Git右键菜单
- 俺的gVim配置文件(解决了菜单栏,右键菜单和提示框中文乱码问题)(for windows,linux下应该也没问题)
- Windows下Cygwin添加右键菜单
- Windows中,为开启了BitLocker的磁盘添加右键锁定菜单
- windows技巧之添加右键菜单
- Windows添加右键菜单
- 右键中添加Git Bash Here菜单
- 在注册表中添加windows鼠标右键菜单
- Windows添加右键菜单
- windows平台把UliPad添加到右键菜单
- windows平台把UliPad添加到右键菜单
- SciTE的配置之三---添加到右键菜单
- 右键菜单添加git选项
- windows 将常用程序添加到右键菜单中去
- Windows下将gvim添加到右键菜单
- 在Windows注册表中添加右键菜单删除CVS Folds的选项
- 如何添加程序到windows的鼠标右键菜单,
- 如何在Windows 7 64位系统下 添加UltraEdit到鼠标右键菜单( win7 64位 Ultraedit32 )
- Windows外壳扩展编程之添加右键菜单