这可能不是最好的编程问题,但实际上,服务器故障的人并不精通git,所以我认为更适合这个听众。
我想切换到TortoiseGit或PortableGit,在我的shell中使用它们,但我却被这些烦人的上下文菜单选项所困扰。
我该如何让它们消失?我需要编写脚本来卸载它们吗?
这可能不是最好的编程问题,但实际上,服务器故障的人并不精通git,所以我认为更适合这个听众。
我想切换到TortoiseGit或PortableGit,在我的shell中使用它们,但我却被这些烦人的上下文菜单选项所困扰。
我该如何让它们消失?我需要编写脚本来卸载它们吗?
仅仅进行注册表移除 - 不做其他操作 - 在我的Win8.1上有效,适用于最新版本:
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\background\shell\git_gui]
[-HKEY_CLASSES_ROOT\Directory\background\shell\git_shell]
[-HKEY_CLASSES_ROOT\Directory\Shell\git_gui]
[-HKEY_CLASSES_ROOT\Directory\Shell\git_shell]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_gui]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_shell]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\git_gui]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\git_shell]
您也可以使用CCleaner禁用单个条目。
explorer.exe
进程后它起作用了。 - Vlad Sabev在安装msysgit时,有一个名为“Windows资源管理器集成”的选项,您可以取消勾选此选项以避免它们显示。
您可以重新运行安装向导并取消勾选该选项,或者卸载并重新安装msysgit并在安装过程中取消勾选该选项。
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT | Out-Null
Remove-Item -Path "HKCR:\Directory\shell\git_gui" -Recurse
Remove-Item -Path "HKCR:\Directory\shell\git_shell" -Recurse
Remove-Item -Path "HKCR:\Directory\Background\shell\git_gui" -Recurse
Remove-Item -Path "HKCR:\Directory\Background\shell\git_shell" -Recurse
2. 注销shell扩展dll 以删除其他菜单项 (GitExt clone..., GitExt Create New Repository, 等等):
regsvr32 /u "C:\Program Files (x86)\GitExtensions\GitExtensionsShellEx64.dll"
HKEY_USERS\S-1-5-21-2901758233-4091616725-3820123586-1012\Software\Classes\LibraryFolder\background\shell\git_gui
HKEY_USERS\S-1-5-21-2901758233-4091616725-3820123586-1012\Software\Classes\LibraryFolder\background\shell\git_shell
在HKEY_USERS和Software之间的那个特定数字可能因人而异,因账户而异,请确保它适合您。
因此,修改后的完整注册表删除应为:
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\background\shell\git_gui]
[-HKEY_CLASSES_ROOT\Directory\background\shell\git_shell]
[-HKEY_CLASSES_ROOT\Directory\Shell\git_gui]
[-HKEY_CLASSES_ROOT\Directory\Shell\git_shell]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_gui]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_shell]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\git_gui]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\git_shell]
[-HKEY_USERS\S-1-5-21-2901758233-4091616725-3820123586-1012\Software\Classes\LibraryFolder\background\shell\git_gui]
[-HKEY_USERS\S-1-5-21-2901758233-4091616725-3820123586-1012\Software\Classes\LibraryFolder\background\shell\git_shell]