这不是最好的编程问题,但让我们面对现实吧,服务器故障人员并不精通 git,所以我认为它更适合这些受众。
我想在我的 shell 中切换到 TortoiseGit 或 PortableGit,但我留下了这些烦人的上下文菜单选项。
我怎样才能让他们离开?我必须编写脚本来卸载它们吗?
这不是最好的编程问题,但让我们面对现实吧,服务器故障人员并不精通 git,所以我认为它更适合这些受众。
我想在我的 shell 中切换到 TortoiseGit 或 PortableGit,但我留下了这些烦人的上下文菜单选项。
我怎样才能让他们离开?我必须编写脚本来卸载它们吗?
From a cmd.exe window, run these commands:
cd "C:\Program Files (x86)\Git\git-cheetah" regsvr32 /u git_shell_ext64.dll
From a cmd.exe window, run these commands
cd "C:\Program Files\Git\git-cheetah" regsvr32 /u git_shell_ext.dll
If you are on Windows 10 and the previous methods did not work try to uninstall the application and reinstall it. But be careful during the installation process unchecking Windows explorer integration
从最近的版本开始,只有这个注册表删除 - 没有别的 - 在 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 禁用单个条目。
当您安装 msysgit 时,您可以取消选中“Windows Explorer 集成”选项以使其不显示。
您可以重新运行安装程序并取消选中该选项,或者卸载并重新安装并取消选中它。
我有一个类似的问题,上面所有的答案都对我不起作用,那么最后我在下面的步骤中找到了一个解决方案。
第 1 步:输入regedit
开始菜单
第 2 步:运行注册表编辑器
第 3 步:导航到HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\Background\shell
第四步:点击“外壳”
第5步:右键单击“Git Bash Here”并选择删除选项
干杯
在Windows 10 64 位上,您需要执行以下两项操作:
1.删除注册表项
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
为方便起见,或者如果您想自动删除(例如在 choco 升级后使用),您可以在 Powershell 中运行(以管理员身份运行):
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. 注销外壳扩展 dll以删除额外的菜单条目(GitExt 克隆...、GitExt 创建新存储库等):
regsvr32 /u "C:\Program Files (x86)\GitExtensions\GitExtensionsShellEx64.dll"
为了补充 dfkt 所说的内容,还有一个位置,用于库文件夹:
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]