Git修复目录文件夹的右键快捷方式

xingyun86 2022-4-11 1247

Git的右键快捷方式消失了,使用此注册表恢复。(将代码保存为.reg文件,切记使用ANSI编码,不可使用其它编码格式。双击运行即可)

Git2.x以后版本,根据自己Git安装目录进行修改:(替换D:\\Git即可)

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\git_bash]
@="Git Ba&sh Here"
"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_ROOT\Directory\shell\git_bash\command]
@="\"C:\\Program Files\\Git\\git-bash.exe\""

[HKEY_CLASSES_ROOT\Directory\shell\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
@="Git &GUI Here"

[HKEY_CLASSES_ROOT\Directory\shell\git_gui\command]
@="\"C:\\Program Files\\Git\\cmd\\git-gui.exe\" \"--working-dir\" \"%V\""

[HKEY_CLASSES_ROOT\Directory\Background\shell\git_bash]
@="Git Ba&sh Here"
"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_ROOT\Directory\Background\shell\git_bash\command]
@="\"C:\\Program Files\\Git\\git-bash.exe\""

[HKEY_CLASSES_ROOT\Directory\Background\shell\git_gui]
@="Git &GUI Here"
"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_ROOT\Directory\Background\shell\git_gui\command]
@="\"C:\\Program Files\\Git\\cmd\\git-gui.exe\" \"--working-dir\" \"%V\""

Git2.x之前版本,仅供参考。

Windows Registry Editor Version 5.00
 
[HKEY_CLASSES_ROOT\Directory\shell\git_gui]
@="Git &GUI Here"

[HKEY_CLASSES_ROOT\Directory\shell\git_gui\command]
@="\"C:\\Program Files\\Git\\bin\\wish.exe\" \"D:\\Git\\libexec\\git-core\\git-gui\" \"--working-dir\" \"%v\""

[HKEY_CLASSES_ROOT\Directory\shell\git_shell]
@="Git Ba&sh Here"

[HKEY_CLASSES_ROOT\Directory\shell\git_shell\command]
@="\"C:\\Windows\\SysWoW64\\wscript\" \"C:\\Program Files\\Git\\Git Bash.vbs\" \"%v\""


×
打赏作者
最新回复 (0)
只看楼主
全部楼主
返回