zoukankan      html  css  js  c++  java
  • git 的右键快捷菜单恢复

    最近装了个vs 2017 的社区版的,发现之前安装的git的右键快捷方式不见了,因此在此写备注,只要是git的安装位置是默认位置的,也可以使用此注册表恢复,其他路径请自行修改reg文件
    主要是针对git 2.x以后的,

    由于windows注册表只支持ascii编码,所以下面内容需要通过记事本另存为ASCII编码后执行,如果是其他如utf-8编码保存的,会呈现乱码

    git 新版本(2.10.x以后)

    git-all-in-one.reg
    从上往下依次是

    • HKEY_CLASSES_ROOTDirectoryshell, 设置选中文件夹时右键打开的快捷方式
    • HKEY_CLASSES_ROOTDirectoryBackgroundshell, 设置在文件夹里面空白处右键的快捷方式

    其他软件的右键快捷方式也可以如此添加,执行regedit命令找到上述路径参考下面填写即可即可。

    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOTDirectoryshellgit_bash]
    @="通过 Git Bash 打开"
    "Icon"=hex(2):43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,
      00,46,00,69,00,6c,00,65,00,73,00,5c,00,47,00,69,00,74,00,5c,00,67,00,69,00,
      74,00,2d,00,62,00,61,00,73,00,68,00,2e,00,65,00,78,00,65,00,00,00
    
    [HKEY_CLASSES_ROOTDirectoryshellgit_bashcommand]
    @=""C:\Program Files\Git\git-bash.exe""
    
    
    
    [HKEY_CLASSES_ROOTDirectoryshellgit_gui]
    "Icon"=hex(2):43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,
      00,46,00,69,00,6c,00,65,00,73,00,5c,00,47,00,69,00,74,00,5c,00,63,00,6d,00,
      64,00,5c,00,67,00,69,00,74,00,2d,00,67,00,75,00,69,00,2e,00,65,00,78,00,65,
      00,00,00
    @="通过 Git GUI打开"
    
    [HKEY_CLASSES_ROOTDirectoryshellgit_guicommand]
    @=""C:\Program Files\Git\cmd\git-gui.exe" "--working-dir" "%V""
    
    
    
    [HKEY_CLASSES_ROOTDirectoryBackgroundshellgit_bash]
    @="通过 Git Bash 打开"
    "Icon"=hex(2):43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,
      00,46,00,69,00,6c,00,65,00,73,00,5c,00,47,00,69,00,74,00,5c,00,67,00,69,00,
      74,00,2d,00,62,00,61,00,73,00,68,00,2e,00,65,00,78,00,65,00,00,00
    
    [HKEY_CLASSES_ROOTDirectoryBackgroundshellgit_bashcommand]
    @=""C:\Program Files\Git\git-bash.exe""
    
    
    
    
    [HKEY_CLASSES_ROOTDirectoryBackgroundshellgit_gui]
    @="通过 Git GUI打开"
    "Icon"=hex(2):43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,
      00,46,00,69,00,6c,00,65,00,73,00,5c,00,47,00,69,00,74,00,5c,00,63,00,6d,00,
      64,00,5c,00,67,00,69,00,74,00,2d,00,67,00,75,00,69,00,2e,00,65,00,78,00,65,
      00,00,00
    
    [HKEY_CLASSES_ROOTDirectoryBackgroundshellgit_guicommand]
    @=""C:\Program Files\Git\cmd\git-gui.exe" "--working-dir" "%V""
    
    
    

    这个是 git2.x以前的,仅供参考

    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOTDirectoryshellgit_gui]
    @="Git &GUI Here"
    
    [HKEY_CLASSES_ROOTDirectoryshellgit_guicommand]
    @=""C:\Program Files (x86)\Git\bin\wish.exe" "C:\Program Files (x86)\Git\libexec\git-core\git-gui" "--working-dir" "%v""
    
    [HKEY_CLASSES_ROOTDirectoryshellgit_shell]
    @="Git Ba&sh Here"
    
    [HKEY_CLASSES_ROOTDirectoryshellgit_shellcommand]
    @=""C:\Windows\SysWoW64\wscript" "C:\Program Files (x86)\Git\Git Bash.vbs" "%v""
    
  • 相关阅读:
    linux下php调试工具xdebug安装配置
    linux下php开发环境搭建(nginx+php+mysql)
    centos7使用docker部署gitlab-ce-zh应用
    CentOS7上Docker安装与卸载
    struts2 中 paramsPrepareParamsStack 拦截器
    ModelDriven & Preparable 接口
    OLW Test
    sqlserver 错误:2,错误40
    C#时间截
    http post发送
  • 原文地址:https://www.cnblogs.com/DHclly/p/6731168.html
Copyright © 2011-2022 走看看