git 如何删除 msysgit 的右键菜单选项?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2459763/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 08:03:22  来源:igfitidea点击:

How do I remove msysgit's right click menu options?

gittortoisegitmsysgit

提问by DevelopingChris

This isn't the best programming question but lets face it, the server fault guys aren't well versed in git, so I think its more towards this audience.

这不是最好的编程问题,但让我们面对它,服务器故障人员不精通 git,所以我认为它更适合这些观众。

I want to switch to TortoiseGit, or PortableGit in my shell, but I'm left with these annoying context-menu options.

我想在我的 shell 中切换到 TortoiseGit 或 PortableGit,但是我留下了这些烦人的上下文菜单选项。

How do I get them to go away? Do I have to write a script to uninstall them?

我怎样才能让他们离开?我是否必须编写脚本来卸载它们?

回答by mpmeyer

64-Bit Windows

64 位 Windows

From a cmd.exe window, run these commands:

从 cmd.exe 窗口,运行以下命令:

cd "C:\Program Files (x86)\Git\git-cheetah"
regsvr32 /u git_shell_ext64.dll

32-Bit Windows

32 位 Windows

From a cmd.exe window, run these commands

从 cmd.exe 窗口,运行这些命令

cd "C:\Program Files\Git\git-cheetah"
regsvr32 /u git_shell_ext.dll

Windows 10

视窗 10

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

如果您使用的是 Windows 10 并且之前的方法不起作用,请尝试卸载该应用程序并重新安装。但在安装过程中要小心取消选中 Windows 资源管理器集成

enter image description here

在此处输入图片说明

回答by dfkt

Only this registry removal - nothing else - worked for me on Win8.1, as of recent versions:

从最近的版本开始,只有这个注册表删除 - 没有别的 - 在 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]

回答by Agostino

You can also disable single entries using CCleaner.

您还可以使用 CCleaner 禁用单个条目。

enter image description here

在此处输入图片说明

回答by Alex Moore

When you install msysgit there is an option for "Windows Explorer Integration" that you uncheck to not have them show up.

当您安装 msysgit 时,有一个“Windows 资源管理器集成”选项,您可以取消选中以不显示它们。

You can rerun the setup and uncheck the option, or uninstall and reinstall and uncheck it then.

您可以重新运行安装程序并取消选中该选项,或者卸载并重新安装并取消选中它。

回答by Abdalla Mohamed Aly Ibrahim

In Windows 10 nothing of the above did work for me. The best solution I found is to uninstall the application and reinstall it and be careful during the installation process to uncheck Windows explorer integration

在 Windows 10 中,以上没有对我有用。我找到的最佳解决方案是卸载应用程序并重新安装它,并在安装过程中小心取消选中Windows 资源管理器集成

remove git remove click menu options

删除 git 删除单击菜单选项

回答by Lavekush Agrawal

I had a similar issue and All the above answer does not work for me, THEN Finally I found a solution in below steps.

我有一个类似的问题,以上所有答案对我都不起作用,然后最后我在以下步骤中找到了解决方案。

Step 1 :Type regeditin start menu

第1步:类型regedit在开始菜单

Step 2 :Run the registry editor

第 2 步:运行注册表编辑器

Step 3 :Navigate to HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\Background\shell

第 3 步:导航至HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\Background\shell

Step 4 :click on "shell"

第四步:点击“壳”

Step 5 :Right click on "Git Bash Here" and choose the delete option

第 5 步:右键单击“Git Bash Here”并选择删除选项

Cheers

干杯

回答by F-Lambda

To add to what dfkt said, there's one more location that has it, for the Library Folders:

为了补充 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

That specific number between HKEY_USERS and Software probably varies from person to person, and account to account, so make sure it's right for you.

HKEY_USERS 和 Software 之间的特定数字可能因人而异,因帐户而异,因此请确保它适合您。

So, the modified, complete registry removal would be:

因此,修改后的完整注册表删除将是:

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]

回答by Ioan Agopian

On Windows 10 64 bitsyou need to do both of the following:

Windows 10 64 位上,您需要执行以下两项操作:


1. Delete registry entries


1. 删除注册表项

HKEY_CLASSES_ROOT\Directory\background\shell\git_gui

HKEY_CLASSES_ROOT\Directory\background\shell\git_gui

HKEY_CLASSES_ROOT\Directory\background\shell\git_shell

HKEY_CLASSES_ROOT\Directory\background\shell\git_shell

HKEY_CLASSES_ROOT\Directory\Shell\git_gui

HKEY_CLASSES_ROOT\Directory\Shell\git_gui

HKEY_CLASSES_ROOT\Directory\Shell\git_shell

HKEY_CLASSES_ROOT\Directory\Shell\git_shell

For convenience or if you want to automate removal (for example to use after choco upgrade) you can run in Powershell (run as Admin):

为方便起见,或者如果您想自动删除(例如在 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. Unregister the shell extensions dllto remove additional menu entries (GitExt clone..., GitExt Create New Repository, etc.):


2. 取消注册 shell 扩展 dll以删除其他菜单项(GitExt clone...、GitExt Create New Repository 等):

regsvr32 /u "C:\Program Files (x86)\GitExtensions\GitExtensionsShellEx64.dll"